Collection Pagination: Jump to Page Number


I recently had a client that wanted to integrate a "jump to" pagination feature. Several of the collections had 40+ pages to jump through. Below is code to integrate. 


<div class="jumpto">
<label>Jump to page #</label><input type='text' id="pageNum"><input type="submit" id="go" value=">" class="button" >
</div>

$("#go").click(function() { 
var pageNum = $('#pageNum').val();
alert(pageNum);
window.location.href = '/collections/{{ collection.handle }}?page=' + pageNum;
});

0 comments

  • There are no comments yet. Be the first one to post a comment on this article!

Leave a comment

Please note, comments must be approved before they are published