Every time I click on the checkbox, an image should appear in the adjacent column for that specific row. Despite using the addClass()
method and targeting the td
, the image is appearing in all rows instead of just the selected one.
Could somebody help me troubleshoot this issue? I have included my code below:
http://jsfiddle.net/wj1z3dnp/6/
$(document).on('change', '#checkIDGrid', function() {
alert("I am inside change");
$("td").addClass("timeGrad1");
if (this.checked) {
var returnVal = confirm("Are you sure?");
$(this).prop("checked", returnVal);
}
// $('#textbox1').val(this.checked);
});