Closed xuanskyer closed 7 years ago
What do you mean by input page?
@1rosehip
sorry, I don't have a clear statement,like this:
I changed the old version jplist.bootstrap-pagination-bundle.min.js.
<input name="" vlaue="" type="text" style="margin:10px;width:80px;" placeholder="jump to.." class="jplist-jump-dest" />
//input page jump js
jQuery(document).on('keypress', '.jplist-jump-dest', function(event){
if(13 == event.which){
var page_num = Number(jQuery(this).val() - 1) || 0;
jQuery('.jplist-pagesbox').append('<button type="button" style="display: none;" data-type="page" data-number="'+page_num+'">'+page_num+'</button>');
jQuery.each(jQuery('button[data-number='+page_num+']'), function(){
jQuery(this).click();return false;
});
}
});
like this:
ugly code , but it works! :)
I'm glad that it works! 👍
Pagination can support the jump to the input page?