I cant get this checkbox to check the checkboxs which are not hidden
Basiclly I need it to not check any check box in the table which is hidden from view
ui-tableFilter-hidden
$("input:checkbox.checkall").live('click', function(event){
var checkedStatus = this.checked;
if(!$('table tbody tr').hasClass('ui-tableFilter-hidden'))
{
$("td.small input:checkbox").each(function() {
this.checked = checkedStatus;
});
}
});
Quick fix was to replace the above code with this one
$("input:checkbox.checkall").live('click', function(event){
var checkedStatus = this.checked;
$("td.small input[type=checkbox]:visible").each(function() {
this.checked = checkedStatus;
});
});
Your IF check and the EACH loop are unrelated in the code above. The IF will evaluate to true at some point and then the EACH loop will iterate through all checkboxes matching the selector, regardless of what you checked in the IF.
Try something like this instead…