Skip to content
This repository was archived by the owner on Jan 2, 2021. It is now read-only.
This repository was archived by the owner on Jan 2, 2021. It is now read-only.

Regenerate the paging #48

@alxe1528

Description

@alxe1528

May submit different parameters in single Page, regenerate the paging, to do so, however, display: 2 of Page 1.
Though the window.location.reload(); can solve the problem, but it doesn't have a good experience.
So hope to provide a param or a destroy mothed to regenerate the paging.

Here is my code:
var recordSize=10;
......
$(function(){

var dataCount=doSearch(1,recordSize);
$('.pagination').jqPagination({
    link_string : '/?page={page_number}',
    current_page: 1,
    max_page    : Math.ceil(dataCount/recordSize),// 4,
    //page_string : '当前第{current_page}页,共{max_page}页',
    paged       : function(page) {
        doSearch(page,recordSize);
    }
});
.........
.........
$("input:radio[name=status]").change(function () {
    var dataCount=doSearch(1,recordSize);

    $('.pagination').jqPagination({
        link_string : '/?page={page_number}',
        current_page: 1,
        max_page    : Math.ceil(dataCount/recordSize),// 4,
        //page_string : '当前第{current_page}页,共{max_page}页',
        paged       : function(page) {
            doSearch(page,recordSize);
        }
    });
    //window.location.reload();
});

});

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions