
Thanks Martin,
Your video did indeed show me how to add classes (assuming I don't just do it in Vim).
But your video left me with one question I didn't have before...
You show how when you have the SVG as a <img/> it's visible all the time because it's not "embedded", and then you went on some sort of a front end to the website and made it "embedded", after which the name stayed invisible until you hoverd the person.
My question is this: Did clicking that "embed" thing on your websites front end perform the same duty as your embed javascript (shown immediately below) does?
================================================================ document.addEventListener("DOMContentLoaded", function(event) { var es = document.querySelectorAll('div[data-svg]'); for(i=0; i<es.length; ++i){ var elem = es[i]; var url = elem.attributes['data-svg'].value;
var xhr = new XMLHttpRequest(); xhr.overrideMimeType("image/svg+xml"); xhr.addEventListener("load", function(evt) { elem.appendChild(xhr.responseXML.documentElement); }); xhr.addEventListener("error", function(ect) { console.error("Failed to load: " + url); }); xhr.open("GET", url); xhr.send(); } }); ================================================================
On Mon, 01 May 2017 01:56:24 -0400 Martin Owens <doctormo@...155...> wrote:
Hi Steve,
Did you watch my video?
https://inkscape.org/en/~doctormo/%E2%98%85group-photo-web-css-popover
It shows how I add css classes to my svg dom.
Best Regards, Martin Owens
On Mon, 2017-05-01 at 01:33 -0400, Steve Litt wrote:
Hi all,
When I do HTML, which is DOM based, I'm able to assign a class property to any element I want. In Inkscape, I've not been able to assign a class property. Does anyone know how that could be done --- it would really simplify some stuff I'm doing.
If Inkscape has no provision for a class property on elements, will it at least leave as-is any class properties I put in with a text editor?
Thanks,
SteveT
Steve Litt April 2017 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user