Navigation

    Monaca & Onsen UI
    • Login
    • Search
    • Tags
    • Users
    • Blog
    • Playground
    1. Home
    2. PrimeNexes
    P
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    PrimeNexes

    @PrimeNexes

    0
    Reputation
    1
    Posts
    369
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    PrimeNexes Follow

    Posts made by PrimeNexes

    • RE: Carousel with infinite scroll

      @Fran-Diox I tried doing it and got it working with a glitch on scrolling enabled that messes it all .Here is the code

        <ons-carousel fullscreen swipeable auto-scroll overscrollable id="carousel" direction="vertical" style="overflow: hidden;">
      
          <ons-lazy-repeat id="infinite-list" style="overflow: hidden;">
          </ons-lazy-repeat>
        </ons-carousel> 
      

      and the JS

        var infiniteList = document.getElementById('infinite-list');
      
        infiniteList.delegate = {
          createItemContent: function(i) {
            console.log('Current item is ' + event.activeIndex);
            return ons._util.createElement(
              '<ons-carousel-item style="background-color: #085078;">Item ' + i + ' </ons-carousel-item>'
            );
          },
          countItems: function() {
            return 10000;
          }
      
        };
        infiniteList.refresh();}
      

      Is there any way to get infinite scroll on carousel ? appending is not working on it.

      posted in Onsen UI
      P
      PrimeNexes