title: Get anchor ids and convert to a JavaScript array
body: <p>How can I use jQuery to obtain all the ids of the anchors within a specific div and convert them to a array for passing over a load/get method?</p>
  
  <p>The HTML will be in the following format:</p>
  
  <pre><code>&lt;div id="a div id"&gt;
     &lt;div style="some styling"&gt;
        &lt;span&gt;&lt;a href="" id="the_id_1"/&gt;&lt;/span&gt;
        &lt;span&gt;&lt;a href="" id="the_id_2"/&gt;&lt;/span&gt;
        &lt;span&gt;&lt;a href="" id="the_id_3"/&gt;&lt;/span&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So in theory I'm after passing the ids of the anchors over a load method so I can refresh the content of a div based on the selected ids.</p>
  
  <p>Edit #1</p>
  
  <p>The id is slightly different from what I mention above.</p>
  
  <p>Here is the function I'm using to obtain the id number from the anchors:</p>
  
  <pre><code>function getSelectedTierPanels(tierId) {
      var container = $('#tier'+tierId+' a').map(function() { 
          return this.id.match(/\d+$/);
      }).get();
      alert(container);
      return container;
  }
  </code></pre>