<div id="chains" class="fa"></div><br />
<div id="label" class="fa"></div><br />
<div id="glass" class="fa"></div>
<style>
#chains, #label, #glass{
font-size:50px;
}
</style>
<script>
// Brake chains Animation
function brakechains(){
let chains = document.getElementById('chains');
chains.innerHTML = "";
setTimeout(function(){
chains.innerHTML = "";
}, 1000);
}
// Call Animation
brakechains();
// Animate Every 2 Seconds
setInterval(brakechains, 2000);
/*
function breakchains(){
var chains = document.getElementById('chains');
//chains.innerHTML = "";
chains.setAttribute("class","fa fa-link");
setTimeout(function(){
//chains.innerHTML = "";
chains.setAttribute("class","fa fa-chains-broken");
}, 1000);
}
breakchains();
setInterval(breakchains, 2000);
//window.addEventListener("load", breakchains, false);
*/
// label Charge Animation
function chargelabel(){
let label = document.getElementById('label');
label.innerHTML = "";
setTimeout(function(){
label.innerHTML = "";
}, 1000);
setTimeout(function(){
label.innerHTML = "";
}, 2000);
setTimeout(function(){
label.innerHTML = "";
}, 3000);
setTimeout(function(){
label.innerHTML = "";
}, 4000);
}
// Run Animation
chargelabel();
// Run Animation Every 5 Seconds
setInterval(chargelabel, 5000);
// glass Tip Animation
function glassTip(){
let glass = document.getElementById('glass');
glass.innerHTML = "";
setTimeout(function(){
glass.innerHTML = "";
}, 1000);
setTimeout(function(){
glass.innerHTML = "";
}, 2000);
}
// Run Animation
glassTip();
// Run Animation Every 3 Seconds
setInterval(glassTip, 3000);
</script>
No comments:
Post a Comment