Hi All,
We are using bootstrap Checkbox and I am trying to call a Function when a checkbox is checked. But the Checked binding is not called at all.
Find below my current code snippet.
In this case, $root.changeTaskStatus is function, which I want to call when the current checkbox is clicked. If I remove function() {}, then the function gets called very first time when page is loaded, but it is not triggered again.
Any thoughts guys, how can I get this work ?
{{#foreach: groupedTasks.tomorrow}}
<li>
<div class="white-check task-check">
<input type="checkbox" value="1" name="tomorrowTask_$index" id="tomorrowTask_$index"
data-bind="checked: function(){$root.changeTaskStatus('overDue', $index, $data)}">
<label for="check08"></label>
</div>
<span>{{description}}</span>
</li>
{{/foreach}}