- This topic has 2 replies, 2 voices, and was last updated 6 months, 1 week ago by eelves.
March 10, 2022 at 10:45 pm #72453eelvesParticipant
I have links to other pages inside of my marker listings. When a user clicks the link the page starts to scroll up to the marker on the map before directing away to the new page. Is it possible to prevent this behavior, only when a link is clicked from within a marker listing, but keep the scroll to the map otherwise?March 11, 2022 at 9:45 am #72461StevenModerator
Thank you so much for getting in touch, we really appreciate your time.
This should be possible with some custom script to adjust the default behaviour.
Please navigate to the link below and copy the script found in the Gist I have created for you:
Once copied, please navigate to -> Maps -> Settings -> Advanced Settings -> Paste this script in the custom JS field and save the settings.
Kindly confirm once complete?
Steven De BeerMarch 18, 2022 at 5:28 pm #72507eelvesParticipant
Steven, thanks for the reply, sorry I didn’t respond sooner. The script you provided is preventing the scroll up effect on all card clicks, what I’m hoping to accomplish is more like this:
-if user clicks a link inside of a card, prevent scroll up to map/opening infowindow and send them through to the link directly
-if user clicks a card but not a link inside the card, allow normal behavior and scroll up to map/open infowindow.
I hope this clarification helps, and thanks for looking into this!
- You must be logged in to reply to this topic.