Open atrandafir opened 5 years ago
Animate.css works properly without WOW.js
My test.html
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<script src="http://code.jquery.com/jquery-3.4.1.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+JP&display=swap" rel="stylesheet">
<style media="screen">
body {
font-family: 'Noto Sans JP', sans-serif;
}
</style>
<script src="animate.css" charset="utf-8"></script>
<script src="wow.js" charset="utf-8"></script>
<script>
new WOW().init();
</script>
</head>
<body>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<div class="wow animated bounceInUp">
<img src="https://miro.medium.com/max/1838/1*t_G1kZwKv0p2arQCgYG7IQ.gif" width="300" alt="">
</div>
</body>
</html>
the new animate.css library has changed the default animated
class to animate__animated
initialize your js code with default animateClass: animate__animated
var wow = new WOW(
{
boxClass: 'wow', // animated element css class (default is wow)
animateClass: 'animate__animated', // animation css class (default is animated)
offset: 0, // distance to the element when triggering the animation (default is 0)
mobile: true, // trigger animations on mobile devices (default is true)
live: true, // act on asynchronously loaded content (default is true)
callback: function(box) {
// the callback is fired every time an animation is started
// the argument that is passed in is the DOM node being animated
},
scrollContainer: null, // optional scroll container selector, otherwise use window,
resetAnimation: true, // reset animation on end (default is true)
}
);
wow.init();
Hi there.
I have tried to use it with
https://raw.githubusercontent.com/daneden/animate.css/master/animate.css
but it did not work.I have copied
https://wowjs.uk/css/libs/animate.css
and looks like it's working.Any ideas on this?
Ty!