I'm trying to load anime.js into my website and it isn't working. I have downloaded the .ZIP and placed it into a subfolder called /js/ and reference correctly. I even can view the anime.min.js file in the sources on Chrome's inspection.
<body>
<div class="container">
<div class="section center">
<h1 class="title"></h1>
<section>
<div class="purple"></div>
<div class="darkgreen"></div>
<div class="darkred"></div>
</div>
</div>
</section>
</div>
</div>
<footer class="center">
<p>CREATED BY HARRY BENDIX-LEWIS | 2017</p>
</footer>
<script src="js/anime.min.js" type="text/javascript">
window.onload = function() {
anime({
targets: ['.purple', '.darkgreen', '.darkred'],
rotate: 360,
borderRadius: '50%',
duration: 3000,
loop: true
});
}
</script>
</body>
I also have:
<script src="js/anime.min.js"></script>
In my head.
Edit: forgot my CSS
div {
height: 50px;
width: 50px;
margin: 10px;
}
.purple {
background-color: purple;
}
.darkgreen {
background-color: darkgreen;
}
.darkred {
background-color: darkred;
}
It makes no sense to me why the animation won't work. I took that code from an example page on CodePen.