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 |
Use ons-navigator on ons-tabbar. | 1,930 Kb |
Ons-popover | 1,955 Kb |
Ons-toolbar | 1,774 Kb |
Ng-show | 1,629 Kb |
Ons-tabbar with ons-sliding-menu | 1,850 Kb |
Ng-include Test | 1,744 Kb |
Ons-tab and ons-navigator | 2,196 Kb |
Ons-lazy-repeat | 1,905 Kb |
Onsen UI | 1,843 Kb |
Ons-splitter-content | 2,138 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 |
CSS eye follow | Pedrocampos | 2,592 Kb |
Dribbble Template | ExtremelyGinger | 2,204 Kb |
Animated bar chart | CreativePunch | 3,124 Kb |
Client-side Email Validation | Collizo4sky | 1,538 Kb |
GLSL Hills | Ykob | 6,991 Kb |
Template | Indra_z85 | 2,323 Kb |
A Pen by Jason Kinney | Jason-kinney | 1,980 Kb |
Button Option Group | Honchoman | 1,859 Kb |
P5.js data visualization | Enginarslan | 2,233 Kb |
We Simplify animation | Meodai | 48,169 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!