I have this span that is in a loop and produce multiple results.
what I want is the attribute recordID value when its checked
<span id="row" index="<?php print $i; ?>" recordID="<?php print $row->ID; ?>" Color="<?php print $row->Color; ?>">
<input type="checkbox" style="left:10;" />
</span>
I am using this in my js file to check if the checkbox was clicked
var test = $('input:checkbox:checked').val();
alert(test);
And all I get is on
how can I get attribute value
Thanks
This will get you the attribute value
If you wanted to get the value when the checkbox gets checked, here is an example
js file
To see how many rows have been checked:
JavaScript
HTML
To check within an individual span
Here is the complete sample code i am using to make the example you need