mirror of
https://github.com/animate-css/animate.css.git
synced 2024-11-17 17:45:17 +01:00
15 lines
300 B
JavaScript
15 lines
300 B
JavaScript
|
/**
|
||
|
Mobile animation list
|
||
|
*/
|
||
|
|
||
|
const toggleOnClick = (el, target, className) => {
|
||
|
const element = document.querySelector(el)
|
||
|
const targetEl = document.querySelector(target)
|
||
|
|
||
|
element.addEventListener('click', e => {
|
||
|
targetEl.classList.toggle(className)
|
||
|
})
|
||
|
}
|
||
|
|
||
|
export default toggleOnClick
|