feat: chaffle header every 10sec
This commit is contained in:
parent
c9309ec03b
commit
710336d881
|
@ -28,22 +28,25 @@ username: Laureηt
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var elements = document.querySelectorAll('[data-chaffle]');
|
var elm_mouseover = document.querySelectorAll('[data-chaffle]');
|
||||||
var elm = document.querySelectorAll('[data-chaffle-onLoad]');
|
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)
|
var chaffle = new Chaffle(el)
|
||||||
el.addEventListener('mouseover', function () {
|
el.addEventListener('mouseover', function () {
|
||||||
chaffle.init();
|
chaffle.init();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Array.prototype.forEach.call(elm, function (el) {
|
Array.prototype.forEach.call(elm_onload, function (el) {
|
||||||
var chaffle = new Chaffle(el, {
|
var chaffle = new Chaffle(el, {
|
||||||
delay: 200
|
delay: 200
|
||||||
})
|
})
|
||||||
chaffle.init();
|
chaffle.init();
|
||||||
});
|
setInterval(function(){
|
||||||
|
chaffle.init();
|
||||||
|
}, 10000)
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
Reference in a new issue