I am trying to make a script which detects clicks on google ads. All events works like onmouseover, out etc except click, focus, mousedown. When i click on google ads it open its ads link but dont run my jquery script on click event. I have tried preventdefault and other functions like that too.
I want to detect click on google ads and parse the iframe width and height to php file when clicked.
$(window).load(function(){
$('iframe').bind('mouseover', function(){
var iframeID = $(this).attr('id');
$(this).contents().find('html').unbind();
$(this).contents().find('html').bind('click', function(){
alert(iframeID);
});
});
});
this is the code run on mouseover but not on click event.