jQuery works on jsFiddle doesn't work on wesite -
i have jquery script works in jsfiddle, doesn't work on actual website , cannot think of more do.
here fiddle
and here website
i need checkbox when clicked in turn check number of other checkboxes.
$("form input[id='selectall']").click(function () { var inputs = $("form input[class='produse4export']"); (var = 0; < inputs.length; i++) { if (this.checked) { inputs[i].checked = true; checkme(); } else { inputs[i].checked = false; uncheckme(); } } });
when these checkboxes checked (all @ once), have enable other checkboxes. when unchecked rest of checkboxes have again disabled , unchecked (if checked).
kinda hard explain, both fiddle , webpage easy read. why doesn't work expected?
in fiddle, binding event on page load. on page, attempting while parsing page itself.
on page, change event handler binding code to:
$(document).ready(function() { $("form input[id='selectall']").click(function () { ... }); });
Comments
Post a Comment