No description, website, or topics provided.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
examples
src
.editorconfig
.eslintrc
.gitignore
README.md
bower.json
gulpfile.js
package.json

README.md

viewpager.js

Basic usage

...
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);
  }
});