延迟加载插件和Jscroll无法一起使用,并且图像也无法加载 [英] Lazy loading plugin and Jscroll not working together and images are not loading
问题描述
我使用了一个jscroll插件,并且在我的应用程序中也使用了一个延迟加载插件. 现在滚动显示,我的内容已正确加载并替换,但我的图像未加载.
查看我的代码:-
$('#product-grid').jscroll({
debug: true,
autoTriggerUntil: 2,
nextSelector: '.pager a:last',
contentSelector: '.product-grid',
callback:call()
});
function call()
{
alert("hi");
$("img.lazy").lazyload();
}
现在在上面的代码中看到我使用了回调函数,但是在所有滚动之后都不会调用它.为什么? 有人可以帮我吗?
我也有另一个问题.我已将autoTriggerUntil设置为2,但在2次触发后没有任何下一个链接,所以我该如何解决.
请回复
我需要帮助
致谢, 维尼特
从jscroll函数中删除().
例如:-
callback: call,
,然后尝试从此回调函数调用中删除该延迟加载.
应该可以.
i have use a jscroll plugin and also used a lazy loading plugin in my application. now on scroll my content is load and replace properly but my images are not load.
see my code:--
$('#product-grid').jscroll({
debug: true,
autoTriggerUntil: 2,
nextSelector: '.pager a:last',
contentSelector: '.product-grid',
callback:call()
});
function call()
{
alert("hi");
$("img.lazy").lazyload();
}
now in above code see i used a callback function but it's not call after all scroll. why? can any one help me ?
i have another issue too. i have set autoTriggerUntil: 2, but after 2 trigger there is no any next link so how can i solve this.?
please reply
i need help
regards, vinit
remove () from your jscroll function.
for ex:-
callback: call,
and try to remove that lazyloading from this callback function call.
it should be work.
这篇关于延迟加载插件和Jscroll无法一起使用,并且图像也无法加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!