Ons-lazy-repeat
How do I make an ons-lazy-repeat?
Refresh() test.. What is a ons-lazy-repeat? How do you make a ons-lazy-repeat? This script and codes were developed by Keiji Odagawa on 10 September 2022, Saturday.
Ons-lazy-repeat - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>ons-lazy-repeat</title> <link rel='stylesheet prefetch' href='https://unpkg.com/onsenui/css/onsenui.css'>
<link rel='stylesheet prefetch' href='https://unpkg.com/onsenui/css/onsen-css-components.css'>
</head>
<body> <ons-page> <ons-toolbar> <div class="center">Lazy Repeat</div> <div class="right"> <ons-toolbar-button onclick="clear1();">clear</ons-toolbar-button> </div> </ons-toolbar> <ons-list> <ons-lazy-repeat id="infinite-list"></ons-lazy-repeat> </ons-list>
</ons-page> <script src='https://unpkg.com/onsenui/js/onsenui.js'></script> <script src="js/index.js"></script>
</body>
</html>
Ons-lazy-repeat - Script Codes JS Codes
var listItems = [];
initData();
ons.ready(function() { var infiniteList = document.getElementById('infinite-list'); infiniteList.delegate = { createItemContent: function(i) { return ons._util.createElement( '<ons-list-item>' + listItems[i] + '</ons-list-item>' ); }, countItems: function() { return listItems.length; }, calculateItemHeight: function() { return ons.platform.isAndroid() ? 48 : 44; } }; infiniteList.refresh();
});
function initData() { var infiniteList = document.getElementById('infinite-list'); var i; for (i = 0; i < 26; i++) { listItems.push(String.fromCharCode(97 + i)); }
}
function clear1() { var infiniteList = document.getElementById('infinite-list'); listItems = []; infiniteList.refresh();
}
![Ons-lazy-repeat - Script Codes](http://shots.codepen.io/keiji/pen/gmxEJj-512.jpg)
Developer | Keiji Odagawa |
Username | keiji |
Uploaded | September 10, 2022 |
Rating | 3 |
Size | 1,846 Kb |
Views | 36,432 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Ons-modal | 1,764 Kb |
Ons-popover | 1,955 Kb |
Ons-lazy-repeat | 1,846 Kb |
Ons-toolbar | 1,774 Kb |
Ons-lazy-repeat | 1,905 Kb |
Ng-include Test | 1,744 Kb |
Ons-page in ons-carousel | 2,329 Kb |
Ng-show | 1,629 Kb |
Ons-splitter-content | 2,138 Kb |
Onsen UI | 1,843 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Mobile Nav Menu | AliKlein | 4,745 Kb |
CSS- UI Element States Pseudo-Classes | Tesla809 | 2,206 Kb |
Bootstrap Carousel Fade Transition | Rowno | 2,484 Kb |
Scoreboard.js basic usage | Tbleckert | 1,733 Kb |
Free css icon set v2 - one div | Ben_jammin | 0 Kb |
A Pen by Rob Levin | Roblevin | 2,787 Kb |
Modal Dialog | Gigaleet | 2,251 Kb |
JQuery exercise | Brian-baum | 3,780 Kb |
Bezier Animation with straight paths | Rhernando | 2,087 Kb |
Loading animation | Hafizfattah | 0 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!