Notes:
- Adding a link does not equal an endorsement of any kind.
- Ordered by year and discovery date.
jQuery(document).ready(function() { | |
//Set-up some constants. | |
var scrollTimeout; | |
var scrollUsePushStateInstead = false; //Set to true to make the history stack of the browser include every point when posts were loaded. It's kind of annoying. | |
var scrollDelay = 200; //Milliseconds | |
var scrollLoading = false; | |
var triggerOffset = $(document).height() - $('#pagination').siblings().eq(-4).offset().top; //The point of this is to do one calculation up front instead of multiple calculations every time the infinite scroll is triggered. | |
// Simple feature detection for History Management (borrowed from Modernizr) | |
function supportsHistory() { |
this.$el.find( '.taxonomy-terms' ).select2({ | |
multiple: true, | |
ajax: { | |
url: WP_API_Settings.root + 'wp/v2/terms/' + this.options.taxonomy.slug, | |
data: function( term, page ) { | |
return { | |
search: term, | |
page: page, | |
_envelope: true | |
} |
Notes: