I'm assuming you want the current value of the checked checboxes. Just
use .serialize()
var inputs = $("input[name^='day']").change(function () {
console.log(inputs.serialize());
});
the output of serialize() is a query string, just split on '&' for an
array of key=value that you can then proc
You could use my Values plugin (
http://plugins.jquery.com/project/values ) and do:
$(document).ready(function() {
$("input[name^=day]").change(function () {
var all = $('input[name^=day]').values();
for (var day in all) {
if (all[day] !== null) {
You could do it in a loop using each():
$("input[name^='day']").each(function() {
if ($(this).is(":checked")) {
// do whatever
}
});
On Aug 19, 5:20 pm, blcArmadillo wrote:
> I have a simple set of checkboxes:
>
> Sun name="day2" type="checkbox" value="mon" /> Mon type="checkbox" va
3 matches
Mail list logo