floatbox in an svg?

Page: 1

Author Post
Member
Registered: Dec 2015
Posts: 8
I'm trying to figure out how to use .svg files to display documents with active links. I'd like to have those links open in floatbox, but so far, no dice.
When I posted links The code for my sample is very long, and I'm pretty sure the only relevent sections are before and after the image, but here goes (the white rectangle is the link):

<admin>
Giant source code postings are useless and won't be read. A huge base64 encoded image wins the all-time first prize. I've edited out 47,931 characters from your post.
</admin>

<?xml version="1.0" encoding="utf-8"?>
<svg ...>
<a xlink:href="https://floatboxjs.com/" class="floatbox">
<rect x="871.5" y="279.5" class="st0" width="360" height="108"/>
</a>
</svg>

Thanks in advance for any suggestions
« Last edit by admin on Wed Apr 24, 2019 2:20 pm. »
Administrator
Registered: Aug 2008
Posts: 3369
I doubt an xlink:href attribute will be found by Floatbox. You may wish to also add a plain href attribute to the link.

If the svg stuff is dynamically added to the page after the page has initially loaded, you my need to run fb.activate() to light up the floatbox stuff in the new content.
https://floatboxjs.com/instructions#dynamic

You could also try explicitly starting a floatbox in an onclick action:
<a xlink:href="/whatever" onclick="fb.start('/whatever'); return false;">...</a>
https://floatboxjs.com/api#start
« Last edit by admin on Wed Apr 24, 2019 2:21 pm. »

Page: 1