iframe - Track click on whole HTML page with JQUERY -


i'm trying track click on html element.

with:

$('html').click(function() {     // action here }); 

but thing won't work iframe , coudn't catch iframe click, or click selectionbox

http://jsfiddle.net/tyjtc/4/

this answer based on iframe content of domain, using jquery 1.7.2 , should inside of document ready

http://jsfiddle.net/tyjtc/6/

html

<iframe id="myframe" src='/'></iframe> 

js

$('#myframe').contents().find('body').bind('click', function(e) {     alert('clicked'); }); 

Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -