I\'ve got a layout with an inline SVG (an archaeological drawing of a site\'s floor plant) with some explanatory text in a sidebar and I would like to change some of the att
No. jQuery is designed to work with HTML. SVG elements are in the SVG namespace and the jQuery functions generally don't work on them.
You can modify an SVG element's class
using setAttribute()
:
mysvgelement.setAttribute("class", someclass);
Or use one of the various JS support libraries for SVG manipulation.