Giter VIP home page Giter VIP logo

ajax-page-plugin's Introduction

用户ajax分页,分页中有省略号

  • 使用方法:渲染目标dom为$('#ajaxPage')
ajaxPage.init({
    ajaxLink:'',//ajax request url
    target:$('#youTargetDom'),
    tpl: $('#yourTplDom').html(),
    method:'yourRequestMethod',
    data:{},//the request data, not required
    fun: function(data){
        //your code using to handle the json data
    }
});
  • tpl示例:
<script type="text/template">
    <p>{name}</p>
</script>
  • JSON数据示例:
{
    data:[{
        name:'myNameIsAlice'
    },{
        ...
    }]
}
  • 存在的问题:现在还不能传入自定义的被点击的样式,统一样式名称为active;
  • 修复了一下数据的处理方式;
  • 修复了一下ReamMe
  • 修复在多次初始化时,防止重复绑定的问题
  • 修复分页函数请求时只请求页面curPage这个参数

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.