STAGGER TEXT ANIMATION ON LINKS HOVER WITH JavaScript - Elementor Wordpress Tutorial Flex Container

Sdílet
Vložit
  • čas přidán 29. 08. 2024

Komentáře • 40

  • @andreaegli
    @andreaegli  Před 10 měsíci

    This animation is specific for links (not buttons- doesn't work that well, at least not yet so I have not shown how to implement it in this video)

    • @ACEARYAN
      @ACEARYAN Před 10 měsíci

      Its a link only i am not using buttons

    • @andreaegli
      @andreaegli  Před 10 měsíci

      @@ACEARYAN i'm not talking about that, I'm refering to the fact that the line-height and font size need to be adjusted together in order for this to work...this is smth that is specific to your use case i.e font used, size etc...you just need to play around with those properties and make the adjustments

  • @dannyalexander1876
    @dannyalexander1876 Před 4 měsíci

    You have a beautiful personality, Andrea. It compliments the great content you put out for us. Thank you for you dedication and hard work. It is appreciated.

  • @thierryntoh24
    @thierryntoh24 Před 10 měsíci +2

    This is fairly easy to do with GSAP using the Stagger property.
    some HTML:
    Hover me
    Some CSS
    .text-block {
    overflow: hidden;
    position: relative;
    cursor: grab;
    }
    .text {
    position: absolute;
    display: inline-flex;
    }
    Some JavaScript
    let textBlock = document.querySelector(".text-block"),
    one = document.createElement("div"),
    two = document.createElement("div");
    let splitText = (element) => {
    let chars = element.innerText.trim().split("");
    element.setHTML("");
    chars.forEach((char) => {
    element.innerHTML += `${char === " " ? "\xa0" : char
    }`;
    });
    };
    one.classList.add("text");
    one.innerText = textBlock.innerText;
    splitText(one);
    two = one.cloneNode(true);
    one.classList.add("one");
    two.classList.add("two");
    textBlock.setHTML("");
    textBlock.appendChild(one);
    textBlock.appendChild(two);
    gsap.set(textBlock, { height: one.clientHeight, width: one.clientWidth });
    gsap.set(".text.two span", { yPercent: 100 });
    let anim = gsap
    .timeline({
    defaults: { ease: Linear, stagger: { each: 0.025, from: "end" } },
    })
    .to(".text.one span", { yPercent: -100 })
    .to(".text.two span", { yPercent: 0 }, "

  • @franktielemans6624
    @franktielemans6624 Před 10 měsíci +1

    I think you can do this with only CSS when you put each letter in a span element.
    For the staggering effect you could add an data-attribute to each span and use a CSS calc formula to generate the staggering animation.
    That way you don't have to target each letter via an nth-child selector and transition-delay value. You only need a interval value.

    • @andreaegli
      @andreaegli  Před 10 měsíci

      For sure, would love to see how you implement this, make a video on it? It would be nice to have a second option. Also, I find it difficult to implement on buttons, still working on it but not there yet. Maybe your solution would help…

    • @franktielemans6624
      @franktielemans6624 Před 10 měsíci +3

      ​@@andreaegli I created all kind of buttons long time ago and a staggeringing letter animation is one of them.
      But I can't show you the demopage bacause when I paste an external URL, my comment will be removed by youtube..
      Also for the effect you have to clone the button text.. You can do this via a data-atribute in the link of the button.
      Each button widget has the option to add a custom attribute via the link options (the cog icon)
      Imagine you have a button with text "show more"
      If you want to clone that button text, you can go to link options of the button and create a custom attribute like this
      data-text | show more
      in CSS styles you create a psuedo element where you use the custom attribute as content,
      content: attr(data-text);
      The content of the psuedo will be text of your button.
      One of my buttons has these styles:
      selector {
      overflow: hidden;
      }
      selector .elementor-button-link::before {
      content: attr(data-text);
      position: absolute;
      left: 0;
      right: 0;
      margin: 0 auto;
      bottom: -100%;
      color: aqua;
      padding: inherit;
      transition: 0.5s cubic-bezier(0.76, 0, 0.24, 1);
      z-index: 2;
      transform: rotate(-5deg)
      }
      selector:hover .elementor-button-link::before {
      bottom: 1%;
      transform: rotate(0deg)
      }
      selector:hover .elementor-button-text
      {
      transform: translateY(-200%) rotate(-5deg) !important;
      opacity: 0
      }
      selector .elementor-button-text {
      transform: translateY(0%) rotate(0deg)!important;
      transition: 0.5s cubic-bezier(0.76, 0, 0.24, 1) ;
      opacity: 1
      }
      Here are a few axemples
      franktielemansbe/blog/doubling-text-via-data-attribute
      Dot was removed between franktielemans and be. (otherwise CZcams will remove my comment)

    • @teuccio73
      @teuccio73 Před 10 měsíci +1

      @@franktielemans6624 write the link without the dot

    • @franktielemans6624
      @franktielemans6624 Před 10 měsíci

      @@teuccio73
      good idea 🙂
      franktielemansbe/blog/button-styles
      Dot was removed between franktielemans and be

    • @andreaegli
      @andreaegli  Před 10 měsíci

      @@franktielemans6624 awesome, will give this a try! thanks again!!!

  • @meraopinionadda
    @meraopinionadda Před 10 měsíci +1

    Wow , awesome!

    • @andreaegli
      @andreaegli  Před 10 měsíci +1

      😉 let me know if it worked for you!

  • @bielzinp3
    @bielzinp3 Před 10 měsíci +1

    Thanks for it!!

  • @Proswebdesignct
    @Proswebdesignct Před 9 měsíci +1

    Thank u so much.

  • @tomaszkurz
    @tomaszkurz Před 5 měsíci +1

    The website example - AG "helping founders grow their business" - what is the website url?

  • @ACEARYAN
    @ACEARYAN Před 10 měsíci +1

    Hii andrea, Great tutorial but i am having some issue implementing it when i hover on the heading it works but hover is effect is not working the text is going up but its not showing the hover color

  • @tipoidarraga
    @tipoidarraga Před 10 měsíci +1

    Hi Andrea! I would like to know how you use Elementor and Framer. Do you think one will replace the other? Are you migrating to Framer like many designers? I would like to know your opinion since I feel that Elementor is also part of no-code.

    • @andreaegli
      @andreaegli  Před 9 měsíci +1

      At this point Framer is a little baby compared to Elementor, comparing the two is a bit futile BUT I prefer to stick with WP and whatever page builder like Elementor or bricks or smth else rather than get stuck into an ecosystem where you have to pay an arm and a leg to build complex websites. For example, I know someone who uses Webflow and was charged 20k (yes, no joke) for hosting because he has over 250k page views per month! He's website is a one pager...look up designjoy on Twitter, his name is Brett. So, don't chase shinny things....

  • @bilalmajid3350
    @bilalmajid3350 Před 10 měsíci +1

    amazing #andreaegli😍

  • @kamessytta
    @kamessytta Před 10 měsíci

    Great! 👍👌👏🥰

  • @SmithyProductions
    @SmithyProductions Před 10 měsíci +1

    Would this be a good implimentation for a navigation menu? Thanks!

  • @osheanview
    @osheanview Před 10 měsíci +1

    what's the browser you use? or is it a chrome extension? It's neat how your browser can be toggled on the left.

    • @andreaegli
      @andreaegli  Před 10 měsíci

      It's called Arc browser, only available for mac for now

    • @osheanview
      @osheanview Před 10 měsíci

      @@andreaegli sweet. How is it compared to Chrome or brave? And in terms of privacy/tracking?

  • @user-hl5vm5wo7m
    @user-hl5vm5wo7m Před 7 měsíci +1

    This doesn't work on my website

    • @andreaegli
      @andreaegli  Před 7 měsíci

      I've seen your comment on another video and it seems to me that you are actually not trying very hard to fix your issues. If you just say that something doesn't work without explaining what you did step by step and what happened when it didn't work, nobody can help you. Please try explaining so I or someone in the community can help you. We are all here to help one another. I like to see people trying hard to find solutions to their errors. This is the only way you will learn anything. Don't just copy-paste. Now, explain to us, what is the issue?

    • @user-hl5vm5wo7m
      @user-hl5vm5wo7m Před 7 měsíci

      @@andreaegli Hey, Thanks for your reply I really appreciate it. I have follow each and every step in this video but it seem that the txt is just not showing the hover animation I don't know the reason that why I reply. I am not being rude to you almost I have seen all your video I really love how easy you make uploading cool animation to your website. I have seen almost all your video and try to apply that in my website but I don't know that this hover effect and in that other gsap text revel video it doesn't work on my website.
      Anyways, I really appreciate your content keep uploading new and cool videos. ❤️😊🤗

  • @inf1nit33
    @inf1nit33 Před 10 měsíci +1

    🙌

  • @dustuexperiment6526
    @dustuexperiment6526 Před 10 měsíci

    Hey it will be very great if you create a json template of the thing you are creating

  • @ACEARYAN
    @ACEARYAN Před 10 měsíci +1

    hey, its not working can you help me?

    • @andreaegli
      @andreaegli  Před 10 měsíci

      you need to adjust the line-hight but keep in mind the size of your font. It's a matter of adjusting both in order for it to work accordingly. As you can see in the video, I already explain that..