javascript - Infinte Scroll Changing ID issue -


i'm having issues infinite scroll, itemselector id changes each li. it's not grabbing next page

  • ex:

    <ul class="e-list e-list-entity"> <li id="e-user-366430" class="e-item"></li> <li id="e-user-345435" class="e-item"></li> <li id="e-user-345345" class="e-item"></li> <li id="e-user-234344" class="e-item"></li> </ul> 

    i'm using following container , item selector

    $container = $('.e-list-entity'); itemselector : '#e-user',  

    is right way this?

  • itemselector should rather be:

    itemselector : '.e-item' 

    you have no element id '#e-user'.

    from (very old) documentation:
    itemselector: selector items you'll retrieve

    edit based on comments:

    if have two, or more, instances you'll need make sure selectors still unique. example, following setup unique:

    <ul id="firstscroller" class="e-list e-list-entity">     <li id="e-user-366430" class="e-item"></li> </ul>  itemselector : '#firstscroller .e-item' 

    and second..

    <ul id="secondscroller" class="e-list e-list-entity">     <li id="e-user-366430" class="e-item"></li> </ul>  itemselector : '#secondscroller .e-item' 

    Comments

    Popular posts from this blog

    Payment information shows nothing in one page checkout page magento -

    tcpdump - How to check if server received packet (acknowledged) -