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" >

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

Leave a comment

Please note, comments need to be approved before they are published.