How to make a link open in a new window in js or jquery?

  • 0
    When you click on the link, it should be verified, and after opening the link in a new window.
    I did it like this:
    var win = window.open(href);
    win.focus();

    The method stopped working on an iPhone.
    How to make a link open in a new window in js or jquery?
    JavaScript Naomi Valenzuela, Aug 25, 2019

  • 1 Answers
  • 0
    Well, make a regular link that opens in a new window. Hang up the handler. In the handler, you perform the check and if the check fails, run preventDefault ().
    Norah Hubbard

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!