Hi there, im trying to load an animation drawing only ONCE when im on the elements that i have it include,
the problem is that the animation playing again and again when i scroll down or up after its finished
this is my js :
jQuery(window).scroll(function(event) { if(jQuery(".ergoback").offset().top < jQuery(window).scrollTop() + jQuery(window).outerHeight()) { var fl = new TimelineLite(); var paths = "#path1,#path2,#path3,#path4,#path5,#path6,#path7,#path8,#path9,#path10,#path11,#path12,#path13,#path14,#path15,#path16,#path17,#path18,#path19,#path20,#path21,#path22,#path23,#path24,#path25,#path26,#path27,#path28,#path29,#path30,#path31,#path32,#path33,#path34,#path35,#path36,#path37"; fl.fromTo(paths, 3, {drawSVG:0}, {drawSVG:"102%"}, "-=1"); } });
when the drawing complete and if i move the page up or down its starting again, im trying to use fl.pause(); after the animation but its on pause mode from the beggining
any help with this?
best regards
George Douvogiannis