Skip Navigation

[Gelöst] Is there a list of frontend events

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem: I would like to know if there is a list of front-end events I can use for AJAX Views.

Solution: See the code here for a list of all event handlers currently offered.

jQuery( document ).on( 'js_event_wpv_pagination_completed', function( event, data ) {
    /**
    * data.view_unique_id (string) The View unique ID hash
    * data.effect (string) The View AJAX pagination effect
    * data.speed (integer) The View AJAX pagination speed in miliseconds
    * data.layout (object) The jQuery object for the View layout wrapper
    */
     
});
jQuery( document ).on( 'js_event_wpv_parametric_search_triggered', function( event, data ) {
    /**
    * data.view_unique_id (string) The View unique ID hash
    * data.form (object) The jQuery object for the View form
    * data.update_form (bool) Whether the custom search form will be updated
    * data.update_results (bool) Whether the custom search results will be updated
    */
     
});
jQuery( document ).on( 'js_event_wpv_parametric_search_started', function( event, data ) {
    /**
    * data.view_unique_id (string) The View unique ID hash
    */
     
});
jQuery( document ).on( 'js_event_wpv_parametric_search_form_updated', function( event, data ) {
    /**
    * data.view_unique_id (string) The View unique ID hash
    * data.view_changed_form (object) The jQuery object for the View form after being updated
    * data.view_changed_form_additional_forms_only (object) The jQuery object containing additional forms from other instances of the same View inserted using the [wpv-form-view] shortcode
    * data.view_changed_form_additional_forms_full (object) The jQuery object containing additional forms from other instances of the same View inserted using the [wpv-view] shortcode
    */
     
});
jQuery( document ).on( 'js_event_wpv_parametric_search_results_updated', function( event, data ) {
    /**
    * data.view_unique_id (string) The View unique ID hash
    * data.layout (object) The jQuery object for the View layout wrapper
    */
     
});
jQuery( document ).on( 'js_event_wpv_addon_maps_init_map_started', function( event, data ) {
     
});
jQuery( document ).on( 'js_event_wpv_addon_maps_init_map_inited', function( event, data ) {
     
});
jQuery( document ).on( 'js_event_wpv_addon_maps_init_map_completed', function( event, data ) {
     
});
jQuery( document ).on( 'js_event_wpv_addon_maps_reload_map_started', function( event, data ) {
     
});
jQuery( document ).on( 'js_event_wpv_addon_maps_reload_map_completed', function( event, data ) {
     
});

Relevant Documentation:
https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/

This support ticket is created vor 5 Jahren, 9 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Tim Elliott vor 5 Jahren, 9 Monaten.

Assistiert von: Christian Cox.

Author
Artikel
#1207799

Tell us what you are trying to do?
I'm trying to find a list of all frontend events I can potentially use in js?
I've found these two but can't find a list of any others there may be in the documentation.
js_event_wpv_pagination_completed
js_event_wpv_parametric_search_results_updated

Is there any documentation that you are following?
Have searched Google and the Toolset docs and support forums

#1207853
Screen Shot 2019-02-28 at 12.28.31 PM.png
Screen Shot 2019-02-28 at 12.29.04 PM.png

Hi, you can generate hooks for frontend events using the Frontend events button in the JS editor of the Search and Pagination panel. If you cannot see the Search and Pagination panel, scroll to the top right corner of the screen and click "Screen Options" to activate the panel. When you click the button you can then use the tabs in the popup to browse different types of events. I checked all the checkboxes and generated the following event listener code:

jQuery( document ).on( 'js_event_wpv_pagination_completed', function( event, data ) {
	/**
	* data.view_unique_id (string) The View unique ID hash
	* data.effect (string) The View AJAX pagination effect
	* data.speed (integer) The View AJAX pagination speed in miliseconds
	* data.layout (object) The jQuery object for the View layout wrapper
	*/
	
});
jQuery( document ).on( 'js_event_wpv_parametric_search_triggered', function( event, data ) {
	/**
	* data.view_unique_id (string) The View unique ID hash
	* data.form (object) The jQuery object for the View form
	* data.update_form (bool) Whether the custom search form will be updated
	* data.update_results (bool) Whether the custom search results will be updated
	*/
	
});
jQuery( document ).on( 'js_event_wpv_parametric_search_started', function( event, data ) {
	/**
	* data.view_unique_id (string) The View unique ID hash
	*/
	
});
jQuery( document ).on( 'js_event_wpv_parametric_search_form_updated', function( event, data ) {
	/**
	* data.view_unique_id (string) The View unique ID hash
	* data.view_changed_form (object) The jQuery object for the View form after being updated
	* data.view_changed_form_additional_forms_only (object) The jQuery object containing additional forms from other instances of the same View inserted using the [wpv-form-view] shortcode
	* data.view_changed_form_additional_forms_full (object) The jQuery object containing additional forms from other instances of the same View inserted using the [wpv-view] shortcode
	*/
	
});
jQuery( document ).on( 'js_event_wpv_parametric_search_results_updated', function( event, data ) {
	/**
	* data.view_unique_id (string) The View unique ID hash
	* data.layout (object) The jQuery object for the View layout wrapper
	*/
	
});
jQuery( document ).on( 'js_event_wpv_addon_maps_init_map_started', function( event, data ) {
	
});
jQuery( document ).on( 'js_event_wpv_addon_maps_init_map_inited', function( event, data ) {
	
});
jQuery( document ).on( 'js_event_wpv_addon_maps_init_map_completed', function( event, data ) {
	
});
jQuery( document ).on( 'js_event_wpv_addon_maps_reload_map_started', function( event, data ) {
	
});
jQuery( document ).on( 'js_event_wpv_addon_maps_reload_map_completed', function( event, data ) {
	
});
#1207889

Thanks Christian. I didn't see that button...

I was hoping for a js_event_wpv_pagination_started. Oh well.