dniwebdesign
12-26-2009, 07:22 AM
MERRY CHRISTMAS!!!
Okay...
I have a list of checkboxs all with various data stored via the id, class, and of course value (for when I submit). All checkbox data are created dynamically from MySQL and PHP so the id,class, and value change every time.
<input type="checkbox" value="32" name="invoices[]" id="4681-09122-1261342080" />
<input type="checkbox" value="35" name="invoices[]" id="4680-09121-1261706548" />
<input type="checkbox" value="31" name="invoices[]" id="4681-09121-1261342068" />
$('input[name="invoices[]"]').each(function(i) {
alert($(this).is('.4681'));
});
However this code does not alert whether or or not it is true of false. What am I doing wrong or is even what I'm trying to do possible?
Okay...
I have a list of checkboxs all with various data stored via the id, class, and of course value (for when I submit). All checkbox data are created dynamically from MySQL and PHP so the id,class, and value change every time.
<input type="checkbox" value="32" name="invoices[]" id="4681-09122-1261342080" />
<input type="checkbox" value="35" name="invoices[]" id="4680-09121-1261706548" />
<input type="checkbox" value="31" name="invoices[]" id="4681-09121-1261342068" />
$('input[name="invoices[]"]').each(function(i) {
alert($(this).is('.4681'));
});
However this code does not alert whether or or not it is true of false. What am I doing wrong or is even what I'm trying to do possible?