I have the CPM adverts on my web page - when user click anywhere on the page, the script is opening a poup with advert. Is it possible to create a special script which will be click anywhere on the page without the user's knowledge?
Thanks.
I have the CPM adverts on my web page - when user click anywhere on the page, the script is opening a poup with advert. Is it possible to create a special script which will be click anywhere on the page without the user's knowledge?
Thanks.
I think you want this...
setTimeout(function(){
document.getElementById('test').click();
}, 1000);
<div id='test' onclick='alert("ok");'>Check</div>
I am not sure that I understand your question.
You can read how to handle click everywhere in the page here If you want to open the popup automatically, on document ready, you can click custom html element.
EDIT
You can generate fake click this way:
(function() {
document.getElementById('yay').click();
})();