feat: chaffle header every 10sec
This commit is contained in:
parent
c9309ec03b
commit
710336d881
|
@ -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>
|
||||
|
||||
|
|
Reference in a new issue