Hello! Does anyone know how to create a popunder for when a person clicks on any part of the website / blog open a new tab with another site? Thank you!
Hello! Does anyone know how to create a popunder for when a person clicks on any part of the website / blog open a new tab with another site? Thank you!
javascript function
var popunder="http://site.com/" function loadpopunder(){ win2=window.open(popunder) win2.blur() window.focus() }
We call this function in the onclick event of the opening tag body
<body onclick="loadpopunder()">
If you want to open a site randomly, make an array of the desired sites in var popunder
var popunder=new Array() popunder[0]="http://www....." popunder[1]="http://www....." popunder[2]="http://www....." popunder[3]="http://...." popunder[4]="http://...." //acrescente qtos elementos queira
and replace the variable win2 in the popunder function with win2 = window.open (popunder [Math.floor (Math.random () * (popunder.length))])