jounger / pagination-jquery-plugin

New and Simple Pagination Jquery Plugin for You.
5 stars 1 forks source link

Changing default current page number not working #2

Open nafi-pantha opened 3 years ago

nafi-pantha commented 3 years ago
$('#page').Pagination({ // id to initial draw and use pagination
        size: 50, // size of list input
        pageShow: 5, // 5 page-item per page
        page: 2, // current page (default)  //Not Working
        limit: 10, // current limit show perpage (default)
    }, function(obj){ // callback function, you can use it to re-draw table or something
            //$('#info').html('Current page: ' + obj.page);
    });
chrismaaz commented 1 year ago

Replace: $(this).find('ul > li').eq(settings.boundary===true?2:1).addClass('active');

With: $(this).find('ul > li').eq(settings.boundary===true?2:settings.page).addClass('active');

Note: This only works if the pageShow number is less or equal than the settings.page number.