jQuery分页插件--motypagination

文章转载自:http://motyer.cn/Blog/Details/blog2016101515451280



一款JQuery插件——motypagination。该插件简单易用,只需几个参数的设置即可完成所有的效果,当按照如下方式调用时,显示如下图4.10所示:

$("#motypage1").motypagination({    horizontal:false,    url:function(index){return"javascript:alert('This is page {0}')".replace("{0}", index);}},5,10);


$("#motypage2").motypagination({    pages_shown:5,    url:function(index){return"javascript:alert('This is page {0}')".replace("{0}", index);}},5,10);

参数说明
    

    color:    
        正常文本颜色。
        color string
        默认值:"#787d82"

    disabled_color: 
        失效文本颜色。
        color string
        默认值:"#c8cdd2"

    hover_color: 
        鼠标悬停文本颜色及该项的下边界颜色。
        color string
        默认值:"#ec1500"

    cur_bgcolor: 
        当前页的背景色。
        color string
        默认值:"#ec1500"

    cur_color: 
        当前页上的文本颜色。
        color string
        默认值:"#fff"

    hidewhenonlyone: 
        当只有一项时是否隐藏。
        boolean
        默认值:true

    horizontal: 
        横向还是竖向,如果是横向,那么将是一字排开,否则将会是一个select
        boolean
        默认值:true

    first: 
        是否显示首页。
        boolean
        默认值:true

    last:
        是否显示尾页。
        boolean
        默认值:true

    prev: 
        是否显示上一页。
        boolean
        默认值:true

    next: 
        是否显示下一页。
        boolean
        默认值:true

    first_text: 
        首页显示文本。
        string
        默认值:"首页"

    last_text: 
        尾页显示文本。
        string
        默认值:"尾页"

    prev_text: 
        上一页显示文本。
        string
        默认值:"上一页"

    next_text: 
        下一页显示文本。
        string
        默认值:"下一页"

    pages_shown: 
        显示的页面按钮数目,不包括首页、尾页、上一页和下一页,建议设成奇数。
        int

        默认值:7

    url: 
        页面跳转链接。
        function
        默认值:function(index){
                            return "index_" + index;
                      }


       源代码已经托管在github上面了,有兴趣的可以下载看看,也可以帮助完善。

       https://github.com/liujian619/MotyPagination


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值