Callback Functions

Each Javascript callback function is dispatched directly from core Ajax Load More or one of the various add-ons. To utilize the following callback functions simply copy and paste a code example below into your sites JavaScript file.


Change

almOnChange() is dispatched at the beginning of each Ajax Load More query.

Are you looking for examples?
You’re in luck, we are compiling a list of callback examples in use by Ajax Load More users.


Complete

almComplete() is dispatched after every successful Ajax Load More query – Learn More.

Note: The alm object returned in the callback contains various information about the current Ajax Load More instance. You can locate the most recently added content by accessing the el attribute of the alm object.

Are you looking for examples?
You’re in luck, we are compiling a list of callback examples in use by Ajax Load More users.


Destroyed

almDestroyed() is dispatched after the destroy_after shortcode parameter is triggered.


Done

almDone() is dispatched after all posts have been loaded and there are zero posts remaining.


Empty

almEmpty() is dispatched when zero results are returned in the initial Ajax Load More query.


Filter Complete

almFilterComplete() is dispatched after a successful call to the public function almFilter().


Load

almOnLoad() is dispatched when Ajax Load More initializes.


URL Update

almUrlUpdate() is dispatched after a successful URL update (pushState) from the Single Post, Filters and Search Engine Optimization add-on.


Note: Your sites JavaScript functions file must be loaded after Ajax Load More in order to trigger these callbacks.