In my fiddle here:http://jsfiddle.net/qJdaA/2/
this code is suppose to disable the #monitor
button when there is none checked checkbox.
var checked = $('#status_table tr [id^="monitor_"]:checked');
if (checked.index()==-1){
$('#monitor').attr('disabled','true');
}
But it does not seem to be working. What's wrong?
EDIT: i found out i'm getting blurred with my code. to simplify the whole thing, may be i should change the logic :s How should i do it if i want to enable the monitor button ONLY if there is at least a checkbox been checked?