I am trying to collect all the pkey attributes from a checkbox.
If I do:
It doesn't find anything.
If I do $('.chexPass'), it works fine and finds all the checkboxes and the ones that checked will have a value of "true".
I would like to use the .each loop but if it doesn't work, I can check each value.
Anyone know why it doesn't work?
Thanks,
Tom
If I do:
Code:
$('.chexPass input:checked').each(function () {
$("#ChecklistSelected").val($("#ChecklistSelected").val() + $(this).attr("pkey").val() + ",");
});
It doesn't find anything.
If I do $('.chexPass'), it works fine and finds all the checkboxes and the ones that checked will have a value of "true".
I would like to use the .each loop but if it doesn't work, I can check each value.
Anyone know why it doesn't work?
Thanks,
Tom