Hi, I have a map with filter. All work fine but in mobile view some user tell me that after they click on search button the search not work. This happen because the map is up in mobile and only the search field and search button remains visible.
So I wish to add in mobile a js function or other to scroll up to map id after a user click on search button.
Thanks
Hi,
Thank you for contacting us and I'd be happy to assist.
To suggest the best way to achieve this, I'll need to see how this search and map is set up in the admin area.
Can you please share temporary admin login details, along with an example page where this map can be seen?
Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.
regards,
Waqar
Hi,
I have this problem on several of my platforms, it's a mobile user experience talk.
If I put the map before the filters, on mobile if I go to the filters and push on search button, the map updates but I don't see it if I don't go back on
Hi,
Thank you for waiting, while I performed some tests on my website.
In your view's "JS editor" under the "Search and Pagination" section, you can include the following custom script:
jQuery( document ).on( 'js_event_wpv_pagination_completed js_event_wpv_parametric_search_results_updated', function( event, data ) {
jQuery('html, body').animate({ scrollTop: (jQuery(".wpv-addon-maps-render").offset().top) - 50 }, 'slow');
});
This script will scroll the page to the top of the map's container, whenever the view's items will update through the AJAX, as a result of pagination or the search filters.
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
WOW perhaps you should also consider implementing this default feature!
My issue is resolved now. Thank you!