Skip Navigation

[Resolved] scroll to ID map when user click on search button filter

This support ticket is created 4 years, 6 months ago. 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.

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/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by claudioM-3 4 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#1680093

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

#1681601

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

#1681633

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

#1683475

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

#1683619

WOW perhaps you should also consider implementing this default feature!

My issue is resolved now. Thank you!