CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: JavaScript

Function to Return Document Object from an IFRAME

204 Views
Copy Code Show/Hide Line Numbers
function(a){if(a=$(typeof a=="string"?"#"+a:a).get(0)){a=a.contentWindow||a.a;if(a.document)a=a.document;return a}};
by Nordin
  July 27, 2010 @ 10:40pm
Tags:
Description:
Require jQuery. The function can accept the iframe Id (string), iframe DOM object, or jQuery object for the iframe.

Add a comment


Report Abuse
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate