Get started with snabbt.js CDN
Stable version
Copied!
How to start using snabbt.js CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with snabbt.js CDN - cdnhub.io</title>
<link rel="stylesheet" href="styles.css">
<script src="https://cdn.cdnhub.io/snabbt.js/0.6.4/snabbt.min.js"></script>
</head>
<body>
<button id="animate-button">Animate</button>
<div id="animate-box" class="animate-box"></div>
<script>
const button = document.querySelector('#animate-button');
const box = document.querySelector('#animate-box');
button.addEventListener('click', () => {
Snabbt.animate(box, {
width: '200px',
height: '200px',
backgroundColor: 'red',
borderRadius: '50%',
duration: 500,
easing: 'easeOutQuad'
});
});
</script>
</body>
</html>
Copied!
Copied!