jQuery IFrame Plugin
Although I hate using IFrame, sometimes it's impossible to avoid them.
The impressive use of Javascript and the relative decrement of people using IE had forced designers and programmers to be browser independent more than in the past.
Personally I like jQuery but the $(document).ready() function works only in specific page when you called it.
The IFrame Plugin gets over this limit and with the $.frameReady() function allow us to wait all the IFrame in the page and specify CSS, Javascript, Json formatted data etc we need to pass it!
From the plugin site:
-
$.frameReady(function(){
-
$("I am a div element").prependTo("body");
-
}, "top.mainFrame",
-
{ load: [
-
{type:"script", id:"_fr", src:"/js/myscript.js", test:"myFunction"},
-
{type:"stylesheet", id:"_ss", src:"mycss.css"}
-
] }
-
);
0 commenti:
Posta un commento