Skip to content

Instantly share code, notes, and snippets.

@wplit
Last active November 1, 2020 23:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wplit/21d3c0e29f5327dafd282cb16222a33f to your computer and use it in GitHub Desktop.
Save wplit/21d3c0e29f5327dafd282cb16222a33f to your computer and use it in GitHub Desktop.
hide a load more button if no next pagination link found
jQuery(document).ready(function($) {
let loadMoreSelector = '.load-more'; // change to load more button selector
if (!$('.oxy-infinite-scroller').find('.next').length) {
$(loadMoreSelector).hide();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment