Lazy loading plugin and Jscroll not working together and images are not loading

非 Y 不嫁゛ 提交于 2019-12-21 23:18:29

问题


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


回答1:


remove () from your jscroll function.

for ex:-

callback: call,

and try to remove that lazyloading from this callback function call.

it should be work.



来源:https://stackoverflow.com/questions/25182248/lazy-loading-plugin-and-jscroll-not-working-together-and-images-are-not-loading

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!