Bug Tracker

Modify

Ticket #10329 (closed bug: wontfix)

Opened 3 years ago

Last modified 5 months ago

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 3 years 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
Last edited 6 months ago by dmethvin (previous) (diff)

comment:2 Changed 17 months ago by (at)idlehands

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

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

comment:3 Changed 17 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

comment:4 Changed 6 months ago by michi.schwarz@…

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

comment:5 Changed 5 months ago by dmethvin

#14513 is a duplicate of this ticket.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.