Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other SVG Link / xlink pop a bootstrap modal?

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #198528
    pierrebalian
    Participant

    Hello,

    I’ve made an SVG, and I made a path that is linkable. I did this using the xlink code.

    The problem is that when viewing the source when this is loaded onto my site the data-target seems to be stripped out, which of course stops the modal from launching. For whatever reason the data-toggle stays in place.

    Do any of you code super-geniuses have any ideas on how I can make this work? Essentially i have one graphic with many zones, and when you click on the zone I want to pop a modal with more info. I suppose if I cant do a modal I could do a permanently open pane of some sort?

    #198529
    Paulie_D
    Member

    Perhaps you could make a proper demo…the code you have already isn’t really clear.

    #198550
    pierrebalian
    Participant

    You can view it here, the part labeled “Chuck” is the link if you want to inspect it.

    http://www.simply-essentials.com/know-your-beef/

    #198554
    Paulie_D
    Member

    Inspecting is a lot to ask.

    A Codepen we can play with is of much more use.

    #198581
    Shikkediel
    Participant

    I suspect the issue might be related to clicks not getting registered on an embedded svg rather than the data-target being stripped.

    #198595
    pierrebalian
    Participant

    Hello,
    For some reason Codepen is giving me a whitescreen right now, so I set this up in jsfiddle.

    https://jsfiddle.net/223n6xke/

    So yeah, in the fiddle I inlined the SVG and now the data-target isnt stripped and everything is working fine!

    #198596
    Paulie_D
    Member

    Codepen is having traffic load issues at present.

    in the fiddle I inlined the SVG and now the data-target isnt stripped and everything is working fine!

    Yeah, that would do it.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Other’ is closed to new topics and replies.