views:

65

answers:

1

I have this code:

var addNew = $('#divListBox').find(':checked')
                     .map(function() {
                         return $(this).val();
                     }).get();

I want to know if there's a way to get all the value that's checked and put them in a collection so I can send it to my controller?

+1  A: 

you can do this...

var v_coll=[];
$('#divListBox').find(':checked').each(function(){
   v_coll.push($(this).val);
});
Kratz