Is lazy repeat working in onsen v2 with jquery ?

  • Hi,

    Following some example found, I’m able to get the lazy repeat to work in onsen v1 with jquery. Code is as belows.

    <!DOCTYPE html>
    <html class=''>
        <meta charset='UTF-8'>
        <link rel='stylesheet prefetch' href=''>
        <link rel='stylesheet prefetch' href=''>
                <div class="center">Lazy Repeat with jQuery</div>
                <ons-list-item ons-lazy-repeat="MyDelegate">
        <script src='//'></script>
        <script src=''></script>
        <script src=''></script>
    var MyDelegate = {
        createItemContent: function (index) {
            console.log('Created item #' + index);
            var $element = $('<span>Item #' + (index + 1) + '</span>');
            return $element[0];
        calculateItemHeight: function (index) {
            return 40;
        countItems: function () {
            return 10000000;
        destroyItemContent: function (index, element) {
            console.log('Destroyed item ' + index);

    However when I tried to replace it with onsen v2, its is not working.
    Anyone able to do it successfully in v2 ?

  • @Francis-Thong I can’t tell with your code for certain, but I usually have issues with the script being after the elements. Regardless, here is a working infinite list with Onsen 2 and a whole tutorial on how to work with them:

Log in to reply