title: How to restrict a new window to open with jquery?
body: <p>I have a livechat link on clicking that link it opens a new window. I need to redirect that link to contact us page of website when there are no operators online.
  I have used this , it first opens the chat window for less than 2 seconds but i need that it should not open that chat window at all. How can I do that?</p>
  
  <pre><code>window.opener.location.replace('http://mywebsite.local/index.php?route=information/contact');
  window.close();
  </code></pre>