Git Product home page Git Product logo

jquery.pager.js's Introduction

jQuery.pager.js二次修改


jQuery.pager.js是一款通过回调函数进行分页处理的jQuery插件,原作者是jonpauldavies,公司业务需求需要扩展这段代码,恰好jonpauldavies又没有设定禁止演绎一类的协议,所以才有了这次的二次开发。

通过改进jonpauldavies的jQuery.pager.js,增加鼠标点击当前页码变为可编辑,并绑定回车事件

通过类似如下的方式与后端进行交互:

$("#pager").pager({
    pagenumber: pageIndex,
    pagecount: pageCount,
    buttonClickCallback: function (pageclickednumber) {
        loadPagination(pageclickednumber);
    }
});
function loadPagination(pageNum) {
    jQuery.ajax({
        type: "POST",
        url: baseUrl + "/interface.json",
        dataType: "json",
        data: postData,
        beforeSend: function () {
            $.modal.on("loading");
        },
        success: function (data) {
            //代码区
        }
    }
}

实例:jquery.pager.js v2

jquery.pager.js's People

Stargazers

kangjian avatar

Watchers

James Cloos avatar kangjian 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.