javascript - Using JQuery to open multiple other tabs on initial page load [MobileSafari] -
I created a webpage, which loads two more webpages when loaded, works fine on Safari (pop- Up enabled) However, when I use this page through Mobile Safari (with Pop-up enabled) on iPhone Simulator, new tabs will not open.
Has anyone found a way to allow webpages to open new webpages before loading inside the mobile safari?
& lt; Script type = "text / javascript" src = "jquery-1.11.1.min.js" & gt; & Lt; / Script & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; One class = "site" href = "BBC News / www.bbc.co.uk / news / index.html" target = "_ blank" & gt; New tab & lt; / A & gt; & Lt; One class = "site" href = "ebay / www.ebay.com / index.html" target = "_ blank" & gt; New tab & lt; / A & gt; & Lt; Script & gt; $ ('A'). Each (function () {var clk = document.createEvent ("MouseEvents"); clk.initMouseEvent ("click", wrong, true, window, 0, 0, 0, 0, 0, true, false, false, true , 0, blank); this.dispatchEvent (clk);}); & Lt; / Script & gt; & Lt; Script src = "// ajax.googleapis.com/ajax/libs/jquery/ here javascript version] /jquery.min.js" language = "javascript" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; / Body & gt; & Lt; / Html & gt;
Comments
Post a Comment