title: open new tab(window) by clicking a link in jquery
body: <p>I have a web app that displays rows with <code>go</code> and <code>delete</code> buttons.</p>
  
  <p>If a user clicks <code>go</code>, it should open new tab/window with url built from the row's data.</p>
  
  <p>how can I do this in jquery? What I'm doing is :</p>
  
  <pre><code>$('.go').click( function () {
     var wid = {{ wid|tojson|safe }};
     var sid = $(this).prop('id');
     url = $script_root + '/' + wid + '/' + sid;
  
     // go to url
  });
  </code></pre>
  
  <p>some update:</p>
  
  <p>What I'm really tring to accomplish is dynamically update <code>href</code> of an <code>&lt;a&gt;</code> element.</p>
  
  <pre><code>&lt;a id="foo" href="#"&gt;foo&lt;/a&gt;
  &lt;script type="text/javascript&gt;
  $('#foo').click( function() {
    $(this).prop('href', 'http://www.google.com/');
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>which doesn't work (fiddle :<a href="http://jsfiddle.net/6eLjA/">http://jsfiddle.net/6eLjA/</a>)</p>