We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 076e3f1 commit 747a628Copy full SHA for 747a628
src/util/dom.js
@@ -176,7 +176,7 @@ export function addClass (el, cls) {
176
} else {
177
var cur = ' ' + (el.getAttribute('class') || '') + ' '
178
if (cur.indexOf(' ' + cls + ' ') < 0) {
179
- el.setAttribute('class', (cur + cls).trim())
+ el.className = (cur + cls).trim()
180
}
181
182
@@ -197,7 +197,7 @@ export function removeClass (el, cls) {
197
while (cur.indexOf(tar) >= 0) {
198
cur = cur.replace(tar, ' ')
199
200
- el.setAttribute('class', cur.trim())
+ el.className = cur.trim()
201
202
if (!el.className) {
203
el.removeAttribute('class')
0 commit comments