Jump to content
Search Community

alexe100dra

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by alexe100dra

  1. Hello everyone 

     

    I feel this is an extremely simple question but i haven't found the answer , so i apologize in advance 

     

    i have to animation to open a menu, i want it to be 100% for smaller screen 

     

    thank you ! 

     

     

    image.png.c09ddfe553b31027834ee4806585d7a0.png

  2. Hello 

    thank you for your reply ! 

    ok i understand it much better now ! and yes for use i need to learn  JS ! ( though even if gsap is js i find the logic closer to CSS ...))

     

    thanks for your help ! 

     

    • Like 1
  3. Hello everyone

     

    first of all, i'd like to apologize for my probably very easy question. I'm no coder, i just wanted to custom my website and i got hooked with coding, one thing leading to another, i discovered gsap, i find the syntax pretty easy to understand, i'm more stuck with the triggering the timeline. 

    So i have 3 buttons each trigger a specific function. 

    when i press one button, i want to reverse any other function that played before playing this one . 

     

    So this code below works pretty well, but it is easy because i only have 3 different functions. 

     

    i was wondering if there was a better syntax : "reverse any function that my have played before" rather than listing them like this :

       ingmvOpen.reverse();

          nopackOpen.reverse();

    $("#shipping-btn").click(function () {
    if ($(this).hasClass("menu-open")) {
    $(this).removeClass("menu-open");
    shipOpen.reverse();
     
    } else {
    $(".slidein-btn").not( $(this) ).each(function(){
    $(this).removeClass('menu-open');
    ingmvOpen.reverse();
    nopackOpen.reverse();
    });
    $(this).addClass("menu-open");
    shipOpen.play();
    }
     
    });

     

    and an optional question,  i have to click on a button to reverse a timeline, how can reverse it by clicking anywhere on the page ?

     

    thank you very for your patience 

     

    alex

     

     

     
×
×
  • Create New...