Giter VIP home page Giter VIP logo

tpage's Introduction

tpage

滚动分页插件,目前只是初步版本,后期会加入更多的分页功能

   var page = new TPage("place", {
       page: 2,
       url: "http://www.wutongwei.com/page/{page}.htm",
       callback: bottom
   });
   //回调函数
   function bottom(data) {
      console.log(data);
   }

###参数说明

参数名 参数作用
element 将滚动分页应用到哪个标签里
options 可选参数

###可选参数说明

参数 参数作用
page 初始化分页,默认为第一页
callback 滚动到底部时候触发的时间
url 请求链接,链接中需要替换的分页数,必须用{page}来标注,比如http://www.wutongwei.com/page/{page}.htm

###函数说明

函数 函数作用
scroll(function) 滚动时触发的事件, function中有两个回调参数,滚动位置top和事件e
toTop() 滚动到顶部
to(number) 滚动到某个位置
extend 扩展函数

##反馈 如果期间遇到什么问题, 请反馈给我微信号:bboyer, 我会及时的处理bug,谢谢! 如果对你有用, 就拿去吧!

tpage's People

Contributors

willculture avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.