<tr> <td> <input type="checkbox"> </td> <td>example</td> <td>new test</td> </tr>
i want to click on the "tr" and check the checkbox.
my jquery code to do this is :
$("tr").click(function() {
var checkbox = $("tr input");
if(checkbox.is(":checked")) {
this.prop('checked', 'false');
}
else {
this.prop('checked', 'true');
}
});
it does not work at all.
i'm newbie to jquery so please help me !
This post has been edited by ratonhnaketon: 29 December 2016 - 05:01 AM

New Topic/Question
Reply



MultiQuote




|