I've downloaded the Animate.min.css from the github repo.
I can see an initial animation after page load.
<h1 class="animated bounce delay-2s">Example</h1>
but, if I click on a button:
<button onclick = "myclick()">Animate</button>
the javascript function
function myclick() {
const element = document.querySelector('.my-modern');
element.classList.addClass('animated', 'bounceOutLeft');
}
throws an exception
test_animate.html:14 Uncaught TypeError: element.classList.addClass is not a function
at myclick (test_animate.html:14)
at HTMLButtonElement.onclick (test_animate.html:9)
I've also tried adding jquery with no success
<script src="jquery-3.4.1.min.js"></script>
but I've no idea what I'm supposed to do to fix this issue.
I'd expect to see the following paragraph being animated.
<p name="par_test" class="my-modern">Test this</p>
Edit (found that the issue is IE11 specific)
I copied the addClass from debugging the Animate homepage after seeing this line
function testAnim(x) {
$('#animationSandbox').removeClass().addClass(x + ' animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
$(this).removeClass();
});
};
As per this comment I've corrected it into
element.classList.add('animated', 'bounceOutLeft');
and now the exception has disappeared, but I still can't see the expected animation only on IE11. In Chrome it is all ok. I've posted this as an issue on github.