我有需要绝对定位的图像,以便图像的中心位于其父div的中心.我已经有了执行此操作的代码.
我最近添加了Lazy Load插件,它按预期工作.但是我需要一种在延迟加载加载和淡入图像后触发我的图像居中代码的方法.
我目前的代码基本上是这样的:
jQuery(document).ready( function($) {
// Make all lazy images ready to load themselves and listen for a custom event
$("img.lazy").lazyload({ event:"delayed-lazy-load-event", effect : "fadeIn"});
});
// Wait for the iframes and other important junk to finish loading
jQuery( window ).load( function($){
// trigger lazy loading of thumbnails.
$("img.lazy").trigger("delayed-lazy-load-event")
}
Run Code Online (Sandbox Code Playgroud)
我找不到任何关于Lazy Load的任何功能的信息,它允许我设置一个回调函数在运行fadeIn效果后运行.