javascript - onscroll() to open a new tab without pop-up alert -
i need open new tab when user scrolling in website.
the problem is, far understand, in order new tab open automatically without pop-up warning browsers, user must first trigger event in dom apparently onscroll()
not count one.
is there way me trigger when user scrolling in website allow me open new tab without pop-up alert browser?
this code:
window.onscroll = function(ev) { if(clicked === 1) { return false; } clicked = 1; var win = window.open('<?php echo $redirect ?>', '_blank'); win.focus(); };
that native browser functionality , one. imagine if every site pollute browser number of tabs.
for work user has accept , allow popups domain
Comments
Post a Comment