Skip to content

activeScroll.js is a zepto plugin to deal with the long data list.which will remove dom out of view and resume it when back into view.

Notifications You must be signed in to change notification settings

csonlai/activeScroll.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

ActiveScroll.js

ActiveScroll.js is a zepto plugin to deal with the long data list. It will remove dom out of the view when scroll out and resume them when scroll back into the view.

How it works

ActiveScroll.js will do the follow works:

1.Create a wrap div for every page of items

2.Record the position of every page

3.When users scroll out of the view,remove pages which we could not see and use the placeholder instead.

4.When users scroll in the view,add items back into the view.

Simple Example

Init the ActiveScroll.js plugin:

    var as = $('.list').activeScroll();

When we add items of page,we use addItems function instead of adding them to dom tree directly.

    as.addItems(newItems);

Drawing

About

activeScroll.js is a zepto plugin to deal with the long data list.which will remove dom out of view and resume it when back into view.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published