WordPress Elementor reveals elements or animates elements on scroll effect
Features
🔸Fully customizable
🔸Responsive
🔸Scroll Effects
🔸Code
Tutorial link:
☑️Support me on Patreon
☑️Elementor file download link click here
Code
<script type="text/javascript">
window.addEventListener('scroll',animsetion);
function animsetion(){
var as= document.querySelectorAll('.as');
for(var i=0;i<as.length;i++){
var windowheight = window.innerHeight;
var asTop = as[i].getBoundingClientRect().top;
var asPoint = 150;
if(asTop < windowheight - asPoint){
as[i].classList.add('active');
}
else{
as[i].classList.remove('active');
}
}
}
</script>
<style>
.as{
transform: translateY(150px);
opacity: 0;
transition: all 2s ease;
}
.as.active{
transform: translateY(0px);
opacity: 1;
}
</style>
Comments
Post a Comment