feat: chaffle header every 10sec

This commit is contained in:
Laureηt 2020-11-19 18:11:07 +01:00
parent c9309ec03b
commit 710336d881

View file

@ -28,22 +28,25 @@ username: Laureηt
</footer>
<script>
var elements = document.querySelectorAll('[data-chaffle]');
var elm = document.querySelectorAll('[data-chaffle-onLoad]');
var elm_mouseover = document.querySelectorAll('[data-chaffle]');
var elm_onload = document.querySelectorAll('[data-chaffle-onLoad]');
Array.prototype.forEach.call(elements, function (el) {
Array.prototype.forEach.call(elm_mouseover, function (el) {
var chaffle = new Chaffle(el)
el.addEventListener('mouseover', function () {
chaffle.init();
});
});
Array.prototype.forEach.call(elm, function (el) {
Array.prototype.forEach.call(elm_onload, function (el) {
var chaffle = new Chaffle(el, {
delay: 200
})
chaffle.init();
});
setInterval(function(){
chaffle.init();
}, 10000)
});
</script>
</body>