My checkbox in a table is immediately unchecked

CanadaJoe

New Member
I have a table with checkboxes. When a checkbox is checked I catch the event with jquery but this checkbox is immediately unchecked.The jsfiddle: http://jsfiddle.net/K4uDa\[code\]<table> <tr> <td><input type='checkbox' /></td><td>AA</td> </tr> <tr> <td><input type='checkbox' /></td><td>BB</td> </tr> <tr> <td><input type='checkbox' /></td><td>CC</td> </tr> </table>$(function() { $("table tr").live("click", function() { alert('row clicked'); }); $("table tr td input:checkbox").live("click", function() { alert('checked/unchecked'); return false; });})\[/code\]Where is the problem?Thanks.UPDATE------------------Sorry, I updated my jsfiddle here: http://jsfiddle.net/K4uDa/1/I added a 'return false' because I don't want the other event to fire when a checkbox is checked/unchecked.
 
Back
Top