开发者

jquery manipulate ajax loading content

开发者 https://www.devze.com 2023-03-31 21:44 出处:网络
I p开发者_高级运维upulate with images a div by using ajax. In the index page I have the$(document).ready(function () { which manipulates the images loaded trough ajax. Should this work, because the r

I p开发者_高级运维upulate with images a div by using ajax.

In the index page I have the $(document).ready(function () { which manipulates the images loaded trough ajax. Should this work, because the ready function is alled before the images are loaded trough ajax


Actually $(document).ready is called after the DOM is loaded, but this could happen before the images are actually loaded. You need $(window).load event which is triggered after the page is fully loaded including graphics.


Using $(window).load(function() { you are good to go. Eg : http://jsfiddle.net/toopay/sQJq3/

0

精彩评论

暂无评论...
验证码 换一张
取 消