
Vitor Amorim
-
Posts
3 -
Joined
-
Last visited
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
ScrollTrigger Demos
Downloads
Posts posted by Vitor Amorim
-
-
I tried that, it works when i change the window, but not when i'm changing tabs :/
-
Hi guys,
i have slideshow tween on a page that i'm doing, but everytime that i switch tabs in my browser and stay for a while in this other tab, when i get back to the page, the slideshow accumulates javascript queue and it starts frenetic running the script that did not runned when i was in the other tab, how can i solve this problem?
here is some of my code.
Sorry for the english.
Thank youDiverso.prototype.highlight = function () { var actual = parseInt($('.showSlide').attr('id').replace('slide-','')); if(actual == $('.slide').length - 1){ var next = 1; }else{ var next = actual + 1; } $('.showSlide').removeClass('showSlide'); $('#slide-'+ next).addClass('showSlide'); diverso.tl.to($('.boxSlides'), 0.8, {left: '-='+$('.slide').width(), onComplete:function(){ $('.thumbShow').removeClass('thumbShow'); $('#thumb-'+ next).addClass('thumbShow'); if(next == 1){ diverso.tl.to($('.boxSlides'), 0.001, {left: 0, onComplete:function(){ diverso.highlight(); }}); }else{ diverso.highlight(); } } }, "+=5.0"); };
Javascript queue when switch tabs
in GSAP
Posted
I updated the chrome and it worked, thank you very much Jonathan.
I was geting crazy on this