Callback functions are used to handle the inbuilt JavaScript event to handle some stuff.


This event will dispatch when Ajax Load more plugin initialize

document.addEventListener("cpt_alm_init", function(e) {
   // Fire before init the Ajax Load More..

Before Ajax Call

This event will be fire before call ajax to load more results.

document.addEventListener("cpt_alm_before_loadmore", function(e) {
   // Fire before call the Ajax
   console.log('Loading results...');

After Ajax Call

This event will be fire after successfully ajax.

document.addEventListener("cpt_alm_after_loadmore", function(e) {
   // Fire After Ajax Called
   console.log('Results loaded!');


This event will be fire when ajax failed.

document.addEventListener("cpt_alm_error", function(e) {
   // Ajax fails 


This event will be fire if no more record founds

document.addEventListener("cpt_alm_finish", function(e) {
   // Ajax fails 
   console.log('All records has been listed');