jQuery has a method . contents () , which when used in an iframe element returns an iframe document.
Now you can associate an event with it, get dimensions, get styles of various elements, etc.:
// Get width of iframe document $(iframeDoc).width(); // Get height of iframe document $(iframeDoc).height(); // Bind event to iframe document $(iframeDoc).bind('click', function( event ) { // do something }); // Get the style of an element in the iframe $('div', iframeDoc).css('backgroundColor');
Zuul source share