Is it allowed to use <body onLoad="myfunc()"> along with jQuery’s document.ready() handlers?
I can’t find a way to achieve the same functionality of the <body onLoad> with jQuery.
An example of a use case would be a facebook application. An Iframe facebook app requires the use of the FB.Canvas.setSize function which resize the iframe.
I would need to fire it up only when all elements on the page are finished loading.
$(window).load(myfunc)is what you’re looking for. If you’re working with the load event of an iframe, you can replacewindowwith the iframe element/selector.