Modify ↓
Ticket #10329 (closed bug: wontfix)
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: | ||
| Blocking: | Blocked by: |
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
Change History
comment:1 Changed 20 months ago by rwaldron
- Priority changed from undecided to low
- Resolution set to wontfix
- Status changed from new to closed
- Component changed from unfiled to attributes
- Milestone changed from None to 1.7
comment:2 Changed 6 months ago by (at)idlehands
Check this out if you're stuck without this capability:
comment:3 Changed 6 months ago by (at)idlehands
If you're working with SVG and jQuery, you should add the libraries here: http://keith-wood.name/svg.html#dom
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

http://docs.jquery.com/Won't_Fix#SVG.2FXML.2FVML_Bugs