Improvement to open the popup by hovering over it
-
It would be nice to have a parameter in the shortcode to have the possibility to open the marker popups just by hovering the mouse, without having to click on the marker.
Code example in this url at the bottom of the page:
locations.forEach(element => { new L.Marker([element.lat,element.long]).addTo(map) .on("mouseover",event =>{ event.target.bindPopup('content').openPopup(); }) .on("mouseout", event => { event.target.closePopup(); }) });
https://medium.com/@nargessmi87/booking-bdb7a6deb503
Thanks!!
- The topic ‘Improvement to open the popup by hovering over it’ is closed to new replies.