$('.profile1,.profile3').addClass('selected')
just turn the names or numbers into vars:
var selection = [];
$('form checkbox:checked').each(function(){
selection.push('.'+this.whateverValue);
});
// now selection == ['.profile1','.profile3'];
selection = selection.join(',');
$(selection).add
I don't think you can 'get' class attributes (though you could try $
('div').attr('class');).
I you can get the ids. I set the id and then use jquery search class
so
if you had
[code]
[/code]
etc. you could get the divs by using
[code]
$('div.profile').attr('id');
[/code]
2 matches
Mail list logo