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();
}
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 |
Ng-show | 1,629 Kb |
Ons-toolbar | 1,774 Kb |
Ons-popover | 1,955 Kb |
Ng-include Test | 1,744 Kb |
Use ons-navigator on ons-tabbar. | 1,930 Kb |
Onsen UI | 1,843 Kb |
Ons-carousel with ons-pull-hook | 2,072 Kb |
Ons-tabbar with ons-sliding-menu | 1,850 Kb |
Ons-list with ons-ons-carousel | 2,245 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 |
JavaScript constructors | Simboonlong | 2,415 Kb |
Print element on a page | Mrs_snow | 2,081 Kb |
Wikipedia Viewer | Codinger | 4,681 Kb |
HTML5 Video Autoplay | Zivcos | 1,352 Kb |
Adding and Removing Element | Accimeesterlin | 2,119 Kb |
Brown by pure CSS, no image, no javascript | Aaronchuo | 2,652 Kb |
Page Transitions in Backbone | Mikefowler | 3,691 Kb |
Portfolio Layout Flex | Lahvjal | 3,489 Kb |
A Pen by Matt Popovich | Mpopv | 3,349 Kb |
Animated css matrix type | NielsOeltjen | 3,484 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!