title: How to change current URL and open new tab on click using jQuery
body: <p>I need this to replace every link on a page that has a current URL with something like:</p>
  
  <pre><code>    ("body a").on("click", function() {
       window.open("new_page.html?test=1&amp;test=2", "_newtab");
       window.location.replace('replace_current_page.html?test=1&amp;test=2');
       });
  </code></pre>
  
  <p>I'm not sure that window.open is the right function. Maybe replacing the href is a better idea?</p>