11-28-2018, 09:53 PM
(11-21-2018, 12:54 AM)mudmin Wrote:(11-20-2018, 11:57 PM)peterchen Wrote: The link should take you to a page with a map (leaflet), and ping the current location, or just ping the current location when already on that page.
...
I'm wondering if instead of an id if you can put a unique class on each one in the "icon" class section of the menu builder. I'm out of town at the moment so I'm not able to do a lot of testing, but with jquery you should be able to either target that class or something like a.nearest to target the closest link to that unique class.
Yes, this works:
I add one (!) menu item, with a custom class 'menu-wai' on the icon class, and then, on the landing page, in ready(), I attach the onclick handler to $('.menu-wai').parent()
This feels a bit dirty-ish,as it requires the item to have an icon, and that icon being a tag inside the 'a', but I'm fine with that. Thank you!