$('.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).addclass('selected');

It depends on what exactly you need.

- ricardo

On Oct 15, 8:42 am, "Armand Datema" <[EMAIL PROTECTED]> wrote:
> Hi
>
> I use jquery to filter a dataset based on classes. Each item has a class of
> the profile that news item is in so lets say
>
> <div class="profile1">   <div class="profile2">  <div class="profile3">
>
> nof in a forum i check checkbox for profile 1 and 3 and now i need to have
> have the classes with profile 1 and 3 set to a new class
>
> whats the best way to go about his.

Reply via email to