If I do...

Ext.onReady(function(){alert('Ready');}) 

or...

jQuery(document).ready(function(){alert('Ready');}) 

...and if I have an iframe on the page I'm running this on, the functions don't run until after the iframe has loaded its content.

This is not how I thought these domready functions were supposed to work. I thought they specifically did not wait until things like images and iframes loaded.

Can someone enlighten me? Is there a domready approach I can use which does not wait for iframes?

Thanks

有帮助吗?

解决方案

Just set your iframe src="" in markup. And in your document.ready handler set $iframe.attr('src', "http://...."). This is what we usually do in our projects in the same situation.

其他提示

Your question is related to fouc problem that i faced while loading jquery tabs with considerable data load on each tabs.The tabs was rendering after the whole dom has been processed by the browser.My experience says that your jquery methods will trigger only when dom reading is complete.

See my situation here

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top