Select the ids from an array of jquery elements -


with following jquery statement select array of elements:

selectedsupplierids = $('.supplierlistcheckbox:checked'); 

i need select ids these elements. can without creating array , pushing ids in loop?

you can use .map() array of based on object selection...in case want .id property each, this:

var arr = $('.supplierlistcheckbox:checked').map(function() {              return this.id;            }).get(); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -