Update toggleClass.md

This commit is contained in:
Angelos Chalaris
2017-12-29 00:00:59 +02:00
committed by GitHub
parent 1561f4218b
commit 728826d7eb

View File

@ -9,5 +9,5 @@ const toggleClass = (el, className) => el.classList.toggle(className);
```
```js
toggleClass(document.querySelector('p.special')[0],'special') // The paragraph will not have the 'special' class anymore
toggleClass(document.querySelector('p.special'),'special') // The paragraph will not have the 'special' class anymore
```