| Event | When the event fires | Arguments |
|---|---|---|
awf_after_setup | After the initialization of the page filters | event |
awf_ajax_filter | When an AJAX filtering request starts, before the loading state is set | event |
awf_after_ajax_products_update | After the products list, pagination and other components are updated | event,$response(the jQuery object of the response HTML) |
awf_ajax_products_update_cancellation | When an infinite scroll response is discarded because of the state change | event |
awf_after_counts_update | After the filter counts, dynamic range sliders and filters’ links are updated | event |
Example
Add a message after the “Load More” pagination mode has finished loading all the pages of the current products list:
jQuery( document ).on( 'awf_after_ajax_products_update', function() {
jQuery( '.awf-end-message' ).remove();
if( awf_data.ajax_pagination_end_reached && 1 < awf_data.ajax_pagination_number ) {
jQuery( '<div class="awf-end-message">Your message here</div>' ).insertAfter( a_w_f.products_wrappers.find( awf_data.products_container ).last() );
}
} );
