mirror of
https://github.com/animate-css/animate.css.git
synced 2024-11-18 01:50:36 +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
|