[jQuery] Workaround for $(document).ready not firing
I've seen that some people have had a problem with $(document).ready
not firing. While I have not had this problem, I have thought of what
could be a possible solution. Hopefully it is self explanatory.
var hasLoaded;
$(document).ready(
function()
{
init();
hasLoaded = true;
}
);
$(window).load(
function()
{
if(typeof hasLoaded == "undefined")
{
init();
}
}
);
function init()
{
// do something
}
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/