Problem: I would like to scroll to a specific item on the page by ID when AJAX search results are updated.
Solution: Use the js_event_wpv_parametric_search_results_updated event hook to trigger custom JavaScript after AJAX search results are updated.
jQuery( document ).on( 'js_event_wpv_parametric_search_results_updated', function() { /** * data.view_unique_id (string) The View unique ID hash * data.layout (object) The jQuery object for the View layout wrapper */ jQuery('html, body').animate({ scrollTop: jQuery("#search-space").offset().top }, 'slow'); }); // this line was missing before
Relevant Documentation:
https://toolset.com/documentation/user-guides/adding-custom-javascript-views/
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 7 Antworten, hat 3 Stimmen.
Zuletzt aktualisiert von vor 6 Jahren, 6 Monaten.
Assistiert von: Christian Cox.