0
I need to make sure that according to the mouse scrool is rotating downward, will accompany a line to the side, this I managed to do, as shown in the link below
My difficulty is when you open the page and it already appears two lines, how can I do, to open the site and appear only first line?
$(document).ready(function(){
var count;
$('#servicos ul li.bloco').each(function( index ) {
count = index;
});
$(window).scroll(function (event) {
var scroll = $(window).scrollTop();
var item = $('#servicos ul').offset().top;
if( (scroll+400) > item ){
animSvg( $('.svg') );
}
$('#servicos ul li.bloco').each(function( index ) {
if( index < (count+1) ){
var item = $(this).offset().top;
var anim = $(this).find('.svg-lista');
if( (scroll+200) > item ){
var ativo = $('.label_serv a').children('li').eq(index);
$('.label_serv a li').removeClass('active');
ativo.addClass('active');
animSvg( anim );
}
}
});
});
});
function animSvg(obj){
var val = obj.data('to');
var dist = obj.scrollTop();
obj.animate({
'stroke-dasharray': val
}, 1000, function() {
/*fim*/
});
}
function scrollCustom(id){
var offset = $('#header_titulo').height();
$('html, body').animate({scrollTop:$('#' + id).position().top + offset}, 'slow');
}
It would be nice if you edit your question by bringing the code you developed and are having difficulty changing.
– Leandro Angelo
@Leandroangelo is there friend
– Wagner Martins Bodyboard
What is the name of the plugin that controls these lines?
– Sam
@?vː <script src="js/jquery.stellar_custom.min.js"></script>
– Wagner Martins Bodyboard