Problem:
I have a search form that has multiple selects, submit button and reset button, since I am customising which dropdown is shown based on other one is selected, when a reset button is clicked is not working as expected.
I need to trigger when the reset button is clicked and results are "updated", so I can run a custom JS.
it does not work this way either :
$(function() { $(".resetButton").click( function() { jQuery( document ).on( 'js_event_wpv_parametric_search_results_updated', function( event, data ) { $(function() { // my_custom_js }); }); });
Solution:
I think there is a misunderstanding,
if you want to trigger custom JS codes when user enter your webpage, you can try like this:
jQuery(document).ready(function($) { window.alert("1"); });
if you want to trigger custom JS codes after user click AJAX pagination links of Views, you try with "js_event_wpv_pagination_completed", like this:
jQuery( document ).on( 'js_event_wpv_pagination_completed', function( event, data ) { window.alert("2"); });
If you want to trigger custom JS codes after user do AJAX search of Views, you try with "js_event_wpv_parametric_search_results_updated", like this:
[php]Relevant Documentation:
Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Hong_Kong (GMT+08:00)
Dieses Thema enthält 8 Antworten, hat 2 Stimmen.
Zuletzt aktualisiert von vor 6 Jahren, 9 Monaten.
Assistiert von: Luo Yang.
Das Forum „Types Community Support“ ist für neue Themen und Antworten geschlossen.