Modal Popup - Custom Map Issue

Is there any way to use the same Div ID multiple times on the same site? I’ve got a custom map that I need in two different spots on my site, and in order to use custom maps you have to use the Div ID to link it to the javascript. Anyone know if this is possible?

“Anyone know if this is possible?”

Yep.

Mind sharing your knowledge with me?

Sorry I thought it was enough (:

I don’t have much knowledge on this… Simply give the same unique ID to the divs you want on the pages you want. As long as you don’t put 2 in the same page, the code is OK.

Select a div and got to the settings tab, add a unique ID in the field.

The two divs are on the same page though. Is there any other workaround for this? Essentially, I’ve got a map on my main page, and another map with the same characteristics in a modal popup. However, the custom maps solution posted on the forum here requires using a unique div id for the map div. Is there any way to solve having two of the same maps contained within the same page?

can you share your project’s public link so we can see what you’re working with, please?

Hey PixelGeek. Here’s the link to the project. The popup is under class “Modal Map,”, and the map section itself is called “map” on the modal section. “Modal Map” is only visible in Phone Landscape and Portrait modes.

https://preview.webflow.com/preview/twstdprtzl?preview=26a1209dc1eae647dd65b7b38297ae46

Hi @jordanshotwell, Webflow allows you to put one unique ID on a page, so if you need to use two maps, I would duplicate the javascript you are using in the custom code, and for the duplicate code, change the id to map1 or something like that and give that same ID to your map in the modal popup. If you have questions, let me know :slight_smile: Cheers, Dave

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.