I am trying to make array of ids of all DIVs using the below code,
var srcs = $.map($('div'),function()
{
return this.prop('id');
});
alert(srcs);
Below is my HTML code..
<div id='d1'></div>
<div id='d2'></div>
<div id='d3'></div>
<div id='d4'></div>
Here is the fiddle link,
http://jsfiddle.net/HcL82/