• Resolved eytchh

    (@eytchh)


    Hello,
    I wasn’t sure where to submit this request, so if this is the wrong place please feel free to remove. I was wondering if it would be possible to add Custom Attributes to links within our Image Maps? I use Elementor, and they add this option in most spots where you can add a URL link using the key|value structure. I’m trying to trigger an accordion to open upon clicking a hotspot within the image, and the only way I’ve found to do this is with the Custom Attributes option. It would be greatly appreciated, unless there is another way to do what I’m trying to achieve that I have missed!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Draw Attention Support

    (@wpdrawattention)

    Hello @eytchh

    I’m afraid Draw Attention isn’t outputting a tags to the page, adding custom attributes would not be able to help here 🙁

    Something like this could be done using jQuery but you’d need a JS developer to do this correctly. If you use raw JS, it overwrites the onclick events that are already there and would break DA.

    Thanks!

    Thread Starter eytchh

    (@eytchh)

    I had it working at one point with jQuery, but an update to either Elementor or Essential Addons caused it to stop working properly. Haven’t been able to pinpoint what caused it to break, so I’ve been searching for alternative solutions. I came across another jQuery function that someone used to trigger the accordion to open with a button using Custom Attributes, so I just wanted to see if it would be possible, or if there was any consideration to adding it later on. It really is more of a problem with the Essential Addons Accordion I am using, but they’ve kind of brushed me off as well.

    Thanks for your time

    Plugin Author Natalie MacLees

    (@nataliemac)

    @eytchh We certainly don’t intend to brush you off, but we aren’t practically able to provide support for development customizations beyond what the plugin does out of the box.

    It sounds like you have the Draw Attention side of the equation working just fine. You just need to figure out exactly what changed about the accordion you’re using and how to trigger that to open as expected.

    We’re not actually outputting any <a> tags to the front end that we could add custom attributes to, so that approach won’t work for this case. The hotspots on a Draw Attention image are just paths in an SVG with some JavaScript event handlers to either show the more info area or redirect the window location to a URL. It just doesn’t make sense to add those attributes as they wouldn’t behave the way custom attributes added to links or buttons would behave. It wouldn’t actually solve this issue for you.

    I hope that makes sense. If you have any other questions about how DA works, we’re happy to answer those for you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Attributes’ is closed to new replies.