Skip to main content

Bug Tracker

Side navigation

#10329 closed bug (wontfix)

Opened September 22, 2011 09:36AM UTC

Closed September 22, 2011 01:02PM UTC

Last modified November 05, 2013 01:11AM UTC

addClass/removeClass/toggleClass methods does not work with svg nodes

Reported by: anonymous Owned by:
Priority: low Milestone: 1.7
Component: attributes Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:
Description

html:

<svg><rect id="test" class="someClass"></svg>

js:

var test = $("#test");
console.log(test.attr("class")); // someClass
test.addClass("otherClass");
console.log(test.attr("class")); // someClass
test.removeClass("someClass");
console.log(test.attr("class")); // someClass
Attachments (0)
Change History (5)

Changed September 22, 2011 01:02PM UTC by dmethvin comment:1

_comment0: http://docs.jquery.com/Won't_Fix#SVG.2FXML.2FVML_Bugs1382985273623719
component: unfiledattributes
milestone: None1.7
priority: undecidedlow
resolution: → wontfix
status: newclosed

Changed November 25, 2012 09:27PM UTC by (at)idlehands comment:2

Check this out if you're stuck without this capability:

http://keith-wood.name/svg.html#dom

Changed November 25, 2012 09:33PM UTC by (at)idlehands comment:3

If you're working with SVG and jQuery, you should add the libraries here:

http://keith-wood.name/svg.html#dom

Changed October 28, 2013 05:14PM UTC by michi.schwarz@gmail.com comment:4

Current link to explanation: http://contribute.jquery.org/wont-fix/, section //SVG/XML/VML/Namespaced Elements Bugs//.

Changed November 05, 2013 01:11AM UTC by dmethvin comment:5

#14513 is a duplicate of this ticket.