JQuery: URL is opening twice - how to only open once?
<p>I have a table in which the rows are clickable.  Also within the row I have a clickable button.  Both when clicked open a new window and the same URL.
The clickable row is achieved by JQuery.
The clickable button by HTML. (in case javascript disabled)
How can I stop the URL opening twice ie when the button within the row is clicked?  I have tried boolean logic but could not get it to work i.e the  and button still need to be functional even after clicking the button once.</p>

<p>I am very new to Javascript and Jquery.  Many Thanks.  Pls find my code below:</p>

<p>Jquery code:</p>

<pre><code>$(document).ready(function() {

    $('#myTable tr').click(function() {
        var href = $(this).find("a").attr("href");
        if (href) {
          window.open(href);
        }
    });

});
</code></pre>

<p>the HTML code:</p>

<pre><code>&lt;td&gt;
 &lt;a href="some link" target="_blank"&gt;
  &lt;img src="image.jpg"/&gt;
 &lt;/a&gt;
&lt;/td&gt;
</code></pre>
