Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function dataOnTheFly_initialLoad(element) {
- // I'm just doing a setTimeout to mimic processing some data
- // in a background worker thread
- setTimeout(dataOnTheFly_loadAfterTimeout,1000);
- }
- function dataOnTheFly_loadAfterTimeout() {
- document.getElementById('waiting').style.display = 'none';
- dataOnTheFly_addListItem()
- dataOnTheFly_addListItem()
- dataOnTheFly_addListItem()
- }
- function dataOnTheFly_addListItem() {
- var listItem, container, dataList = document.getElementById('dataList');
- // Create our list item
- listItem = document.createElement('div');
- listItem.setAttribute('data-bb-type', 'item');
- listItem.setAttribute('data-bb-img', 'images/icons/icon11.png');
- listItem.setAttribute('data-bb-title', 'Title ');
- listItem.innerHTML = 'My description';
- // Create a dummy container
- container = document.createElement('div');
- container.appendChild(listItem);
- // Apply the styling
- bb.imageList.apply([container]);
- // Append the item
- dataList.appendChild(container.firstChild);
- // re-compute the scrolling area
- if (bb.scroller) {
- bb.scroller.refresh();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement