JavaScript Events

EventWhen the event firesArguments
awf_after_setupAfter the initialization of the page filtersevent
awf_ajax_filterWhen an AJAX filtering request starts, before the loading state is setevent
awf_after_ajax_products_updateAfter the products list, pagination and other components are updatedevent,
$response
(the jQuery object of the response HTML)
awf_ajax_products_update_cancellationWhen an infinite scroll response is discarded because of the state changeevent
awf_after_counts_updateAfter the filter counts, dynamic range sliders and filters’ links are updatedevent
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() );
	}
} );