Jump to content
Search Community

Gustavo_H

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Gustavo_H

  1. The solution was simple and not really in the handler. slideOn(index); function slideOn(){ if(active && index<3){ gsaping(index); gsap.delayedCall(4,()=>{ slideOn(index); }); }else if(active) { //here it is - I had to block <else> when the handler works index=0; slider.innerHTML=reset; slideOn(index);//here - the delayedCall caused unnecessary pause between the rounds } } So, I'll proceed to make it 100% functional and dirigible, and will close the topic as solved. Please welcome with your recommendations to make the code more laconic.
  2. Hello and Happy Holidays! @GreenSock - Thanks a lot for your help that time, but I had a lack of time to discover all the things deeply and made an animation with vanilla CSS and JS at that time. But, IMHO, it's better later than never, so I decided to go back and study carefully this case & try to resolve it finally, so I will appreciate it if you will give me some more help again. I've discovered your recommendations and made some changes to exclude the links to some slides, that are not necessary - the previous slides. So, I've got the methods you've recommended and refactored the code to operate with one slide only on each iteration. It works nice as an endless slider, but I have a problem with the event listener. As you can see (check the console) - after the listener works, the function works too but nothing goes on in the browser. I've tested the function itself, giving it any existing index from images - it works too, why is it going so with the listener - I really can't understand and will be very grateful for your help if it's possible. Best Regards! Here is it in Codepen
  3. Thanks!!! Sorry for delay - had a long road. I'll try to refactor and if it'll be ok, I'll reply here. Really seems like a solution. Thanks allot!
  4. Hello and Peace! Can somebody help me with the following code? I'm making the slider with navigation using the GSAP. So, in normal flow it should just change pictures and texts one by one in a queue, when the user hovers on the arrow switcher, the .timeline should stop and on mouseleave it should resume, in case of click - the animation should jump to previous one, play the previous animation and stay paused before next click or mouseleave (this is an algorithm for the left control arrow, the reversed one will be used for the right one). The problem is that tweenTo as so as tweenFromTo call the function till the beginning of the .timeline on just one click, not once as I expected... Maybe it's a problem in my function, I'll appreciate your help and advice
×
×
  • Create New...