Answer the question
In order to leave comments, you need to log in
How to change the animation code when scrolling?
codepen.io/tamak/pen/hzEer - here is the progress bar animation. What needs to be changed, or added, so that they are activated during the scroll?
This code has been mercilessly raped in multiple Googled ways, but all in vain.
jQuery(document).ready(function(){
jQuery('.skillbar').each(function(){
jQuery(this).find('.skillbar-bar').animate({
width:jQuery(this).attr('data-percent')
},6000);
});
});
Answer the question
In order to leave comments, you need to log in
You can try this code:
$(document).ready(function(){
var $block = $(".XXXXXX");
$(window).scroll(function(){
if ( $(this).scrollTop() > ZZZ ){
$block.addClass("YYYYYY");
}
});
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question