title: How to get all of the IDs with jQuery?
body: <p>I am trying to gather a list (array) of ids in a sector</p>
  
  <pre><code>&lt;div id="mydiv"&gt;
   &lt;span id='span1'&gt;
   &lt;span id='span2'&gt;
  &lt;/div&gt;
  
  $("#mydiv").find("span"); 
  </code></pre>
  
  <p>gives me a jQuery object, but not a real array;</p>
  
  <p>I can do </p>
  
  <pre><code>var array = jQuery.makeArray($("#mydiv").find("span"));
  </code></pre>
  
  <p>and then use a for loop to put the id attributes into another array</p>
  
  <p>or I can do</p>
  
  <pre><code>$("#mydiv").find("span").each(function(){}); //but i cannot really get the id and assign it to an array that is not with in the scope?(or can I)
  </code></pre>
  
  <p>Anyhow, I just wanna see if there is a shorthand in jQuery to do that;</p>