Any idea why this code is failing? I'm doing the exact same thing somewhere else, except I'm using a DIV with an ID for my selector. This time I needed to use a "CLASS name" as my selector, but it doesn't work. All I want to do is check one checkbox and have it check all the checkboxes that have the same class name. Any help is appreciated, or any other ways of accomplishing the same thing in a better way are appreciated.
Thanks.
Javascript FUNCTION:
function jqCheckAll_byClass(class_name, name, check_me)
{
if (check_me == false)
{
$("." + class_name + " INPUT[@name=" + name + "][type='checkbox']").attr('checked', false);
}
else
{
$("." + class_name + " INPUT[@name=" + name + "][type='checkbox']").attr('checked', true);
}
}
ONCLICK EVENT:
<input type="checkbox" onclick="jqCheckAll_byClass('5_arch_chbx','5_archive_chbx', this.checked );" title="Check All" class="a_hand">
HTML:
<input type="checkbox" class="5_arch_chbx input_editible" name="5_archive_chbx" id="2087archive_chbx_id">