Jump to content
Search Community

Jaexplorer

Members
  • Posts

    12
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Jaexplorer's Achievements

1

Reputation

  1. Update: I found the solution. use fromTo instead, eg: .fromTo(navbarbottom.current, 0.4, { height: "10rem" }, { height: "0rem" })
  2. Jaexplorer

    REM Animation

    Hi, I currently have an animation that I can't seem to get working with REM units. 1.) Having a look at other posts i've set my previous state like this: tl.set(navbarbottom.current, { height: "10rem" }); 2. ) With my animation looking like this: tl.to(navbarbottom.current, 0.4, { height: "0rem" }).reverse(); 3. ) Which would work, except in my CSS i'm changing font-size depending on the screen width/height. 4. ) So if I do the animation, then resize the screen, my 10rem navbarbottom will not be consistent with other elements that are 10rem. Sorry, this is all written in react and as such I don't know how to do a codepen for it. Any suggestions on how I can tackle this?
  3. How am I calling it immediately? It asks for a function, so I give it one. But only accepts a function within a function to work properly.
  4. I got it to work, but by luck. Are you able to explain why this works but this doesn't? Works: t1.add(function() { loadContent(activeClass.getAttribute("value")) }); Doesn't Work: t1.add(loadContent(activeClass.getAttribute("value")));
  5. Hi, I would like to know how to properly use Ajax with Greensock, as currently i'm failing at it. I have: Clicks a nav link var t1 = new TimelineMax(); // An animation that hides the page content and does some page animation A function call to ajax which will load the content // Some animation to reveal the loaded content At the moment as soon as I click a nav link, the content loads immediately by the ajax, then the animation occurs. Any tips?
  6. Jaexplorer

    Width Calc

    Have you thought maybe your extending it's life span by continuing to support it? If we stop supporting it, eventually the "clients" will drop it. You don't even know whether all those that have IE, even use it.
  7. Jaexplorer

    Width Calc

    I agree, the sooner we stop supporting IE. The better the world will be. There no reason to continue supporting IE, it has security issues and all sorts of issues.
  8. Jaexplorer

    Width Calc

    I couldn't get yours to work. Heres the pen I made. The blue is supposed to stretch to all edges (though in this example, i'm just focusing on the width). https://codepen.io/jaexplorer/pen/wLzmPY That being said, i've been able to get it to work by editing the parent padding (see attached)
  9. Jaexplorer

    Width Calc

    I found this worked. But i'm rather disappointed I had to resort to this answer. Especially with css grid and dynamic elements. I thought calc would of been covered in greensock.
  10. Jaexplorer

    Width Calc

    I'm trying to do this: https://pin.it/vxuze2yvii7qrd It starts with padding, then extends to the edge, then back to normal. But I don't know how to do the width without doing calc. All it is is simply grab the current width and plus 4rem. But rem is CSS not JS.
  11. Jaexplorer

    Width Calc

    I read this post, I didn't find it useful.
  12. Jaexplorer

    Width Calc

    Hi, first time posting. Sorry if this seems informal. I've just noticed when I use calc within my greensock function, the duration of my tween becomes 0 and snaps to the result straight away, instead of animating. I'm trying to animate the container to stretch to the edges, eg. width: calc(100% + 4rem), doesn't work. I don't know a work around this? Help pls
×
×
  • Create New...