title: Turn a String into an Anchor with jQuery
body: <p>The second part of the code below listens to when Google Map markers are clicked and adds the URL to the address bar. How to I get this to instead wrap traditional anchor tags around the urls? e.g. &lt; a href='#test2'>&lt; /a></p>
  
  <pre><code>        markers[1] = new google.maps.Marker({
              position: sainsburys,
              url: '#test2',
              title: 'Sainsburys',
              map: map
          });
  
  
          for ( i = 0; i &lt; markers.length; i++ ) {
              google.maps.event.addListener(markers[i], 'click', function() {
              window.location.href = this.url;
              });
          }
  </code></pre>
  
  <p>Full example is here <a href="http://jsfiddle.net/BQzLq/8/" rel="nofollow">http://jsfiddle.net/BQzLq/8/</a>, although you can't see it working properly because JSFiddle won't allow the URL to be modified.</p>