Opened 10 years ago
Closed 10 years ago
#14183 closed bug (duplicate)
XML, removeClass and IE11
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
First, the jsFiddle: http://jsfiddle.net/Cq2wU/1/ After parsing a string as an XML document and wrapping it with jQuery, the
jQuery.fn.removeClass
method doesn't works properly.
This is because the parsed element (a label in this example) does not have any
className
attribute, but the
getAttribute("class")method works fine.
In IE11.
Note: See
TracTickets for help on using
tickets.
Duplicate of #13056.
The dup ticket is closed patchwelcome but that patch would be subject to some pretty harsh scrutiny given the potential for regressions. I've created a docs ticket: https://github.com/jquery/api.jquery.com/issues/347
Use
.attr("class", newValue)
if you simply need to change the entireclass
attribute string.