How can I trigger a jQuery alert when an iframe AND its CSS is loaded and rendered? -
i'm trying trigger alert when <iframe>
, css files loaded , rendered.
i have following far:
$("#content_ifr").ready(function (){ alert('iframe ready'); });
the problem alert happening before css rendered on page, after alert closed, see css taking effect in browser.
any ideas on how solve out sloppy timeout hack?
thanks.
since it's tinymce you're dealing with, have tried apis?
http://wiki.moxiecode.com/index.php/tinymce:api/tinymce.editor
i'm thinking onloadcontent best bet, i'm not sure if css magic.
the way we've found pause loading until css loaded sloppy timeout hack. basically:
- set real specific rule, div.test-file-loaded{ color: #123456 }
- create div of class.
- check if color of element #123456, keep timeouting , retrying until is.
would know if there's non hack way, don't think there is. since you're dealing iframe, more hackiness needed....
Comments
Post a Comment