Hello,
I am very new to jQuery.
I check and test some examples from a jQuery book. In one example there is a list with a checkbox and a label. If you click on the checkbox the item is removed.
My question is:
The item is also removed if you click on the text (label) not only on the checkbox. Is it possible to make the click event more "exact"?
I want that the user have to click on the checkbox, to remove the item, not also the label.
Is this possible, and how?
<li id="my-1386340707583">
<label>
</label>
</li>
$('#checklist
').find(':checkbox').live('change', function(){
var task = $(this).parent().parent();
if($(this).is(':checked')) {
var state = "done";
} else {
var state = "todo";
}
changeTaskState(task, state);
});
best regards
Hans