How to make a link open in a new window in js or jquery?
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.
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
To place the code, please use CodePen or similar tool. Thanks you!