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 blackarmadi...@gmail.com wrote:
I have a simple set of checkboxes:
input name=day1 type=checkbox value=sun / Sun input
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) {
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
3 matches
Mail list logo