...
var w = view_pager_elem.getBoundingClientRect().width;
var vp = new ViewPager(view_pager_elem, {
pages: item_container.children.length,
onPageScroll : function (scrollInfo) {
offset = -scrollInfo.totalOffset;
item_container.style['-webkit-transform'] = 'translate3d(' + (-scrollInfo.totalOffset * w) + 'px, 0px, 0px)';
},
onPageChange : function (page) {
console.log('page', page);
}
});
forked from antonj/viewpager.js
-
Notifications
You must be signed in to change notification settings - Fork 0
enchhuang/viewpager.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- JavaScript 100.0%