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