title: gmaps.js - loop through elements and add markers
body: <p>Using <strong><a href="http://hpneo.github.com/gmaps/examples.html" rel="nofollow">gmaps.js</a></strong>
  How could i loop through something like (HTML):</p>
  
  <pre><code>&lt;h1 id="location"&gt;Phuket&lt;/h1&gt;
  
  &lt;div class="blist"&gt;
      &lt;h3&gt;Some hotel name&lt;/h3&gt;
      &lt;p&gt;Adress 1&lt;/p&gt;
  &lt;/div&gt;
  
  &lt;div class="blist"&gt;
      &lt;h3&gt;Another hotel name&lt;/h3&gt;
      &lt;p&gt;Adress 2&lt;/p&gt;
  &lt;/div&gt;
  
  &lt;div class="blist"&gt;
      &lt;h3&gt;Some name&lt;/h3&gt;
      &lt;p&gt;Adress 3&lt;/p&gt;
  &lt;/div&gt;
  
  &lt;div class="blist"&gt;
      &lt;h3&gt;Some other name&lt;/h3&gt;
      &lt;p&gt;Adress 4&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>..and:</p>
  
  <ol>
  <li>GEO-code + Add marker to the map</li>
  <li>Add name from <code>&lt;h3&gt;</code> into each markers popup</li>
  <li>Add link to each popup that link to it's corresponding  (like an anchor link)</li>
  <li>Use and add #location for all the GEO-code lockups since each name doesn't say too much without that context</li>
  </ol>
  
  <p>I must use a loop, but haven't found any good examples even though searching for hours. One would think it would be a common use sort of.. :)</p>
  
  <p><strong><a href="http://jsfiddle.net/bmGEN/" rel="nofollow">Check/use jsFiddle base >></a></strong></p>