I have an iframe issue ( little bit strange for me ) . The issue is that i have an iframe in my document, and there are several functions are operating different task on that iframe and for accessing the contents of iframe we use :
$("iframe").contents();
So instead of writing this long statement i used a global variable :
var i = $("iframe").contents();
But this is not working well, like
alert( i.find("someelement") );
=> undefined
alert($("iframe").contents().find("someelement")
=> [object]
Whats the problem here?