Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

ynamite

BusinessGreen
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

4 Newbie

About ynamite

  • Rank
    Member
  1. I get it next time I'll whip up a demo! Thanks for the help.
  2. With a timeline like so: https://codepen.io/ynamite/pen/WNrqydM
  3. @ZachSaucier I think I've figured out what the problem is. When the initial state of the element is set with CSS the xPercent/yPercent values get screwed up after resizing the viewport. When I set the initial state with gsap, everything works as it should. See your modified pen for an example of this: https://codepen.io/ynamite/pen/WNrqyZM Concerning your pen and the "most common mistakes" post, I did try to do it with a paused timeline but had two issues, the first being the same as the problem mentioned above with the translate values getting screwed up and secon
  4. Hi I've got a question in regards to refreshing gsap's cashed values on mouseenter. I can provide a codepen if it helps, but it's quite simple to explain I think. In a responsive Website I have an image and a DIV with a white background that appears when you mouse over the image, simply covering it. The DIV slides in from left to right using xPercent and on mouseleave, the element animates back to xPercent 0. I'm using CSS to set the initial state of the DIV using transformX(-100%). $element.parent().on('mouseenter', function(){ gsap.fromTo($element, {
  5. I see. Makes sense, thanks for explanation. Good to know it's not a bug. Indeed, what Zach wrote helped solve the issue. Thanks a lot. Happy as a clam for now.
  6. That does indeed work better. Also I didn't realize gsap could understand vh units (and never bothered to try). That's pretty sweet. Thanks!
  7. Oops, I apologize, I must've messed with the fiddle after posting it (or entered it wrong initially) ... in my project I'm using a percentage value for top – for the reason stated in the previous post. I've updated the fiddle to reflect that.
  8. @ZachSaucier Because I'd like to animate the div relativ to the parent and not relative to itself. As I understand it, transforms work relativ to the element that's being transformed, position values are relative to the closest parent which has position relative. No? Don't mention it, thank you for this awesome library that just keeps on giving
  9. Hi there I'm experiencing an issue with scrollTrigger animating the top CSS property (with a percentage) of an element that also has its bottom property set in CSS, after changing the browser window height. I realize this is a little edgy (setting both bottom and top values), but it is working in all browser I've tested so far and only breaks when resizing, so I figured I'd mention it regardless. What do you guys think?
  10. @ZachSaucier I've managed to fix the problem while whipping up a demo, but thanks for your fast reply (mind boggling how quickly you guys reply, every time). Turns out I had two issues: I was dynamically loading CSS after initializing the scrollTrigger in question. Secondly I hadn't realized that when initializing scrollTrigger on an element, it wouldn't automatically set the triggers (startTrigger and endTrigger) as that element. Setting the triggers explicitly seems to have helped. @GreenSock Sure thing, I'll supply a demo next time don't mention it, it'
  11. @Jack Quick question, wondering if I'm experiencing the same or a similar issue (my intention isn't to hijack this thread). If not, I'll create my own thread I'm building an animation with scrollTrigger and scrub, mostly animating xPercentage or yPercentage values. When I resize my browser window the values for the start and end trigger positions don't seem to update/reflect the changed window dimensions. Is this the same issue? BTW, this plugin is the bees knees, truly jaw dropping. I've decided to renew my membership to support you guys. About that:
  12. Oh wow, thanks a lot for the fast reply, that seems to have done the trick! as you pointed out it was my (old) math that was off. I didn't bother to double check because it seemed to be working correctly before. By the way, this was just a simplified test case, in reality the script is part of a much larger app with images provided by a CMS, but it seems to work nicely now. I missed those, thanks! Very useful. Yep, that doesn't make a lick of sense and is kinda embarrassing. Copy and pasted it like a moron. Thanks so much
  13. Hi there Been using GSAP for years, love the library and use it almost daily! It's awesomecakes. This is my very first forum post I believe For a project I'm working on I'm using my own quite simple Ken Burns implementation, which works without using timeline. There's probably a much better and more efficient way to code this effect so I'm open to suggestions. I've successfully used this approach in the past (at least in a very similar fashion) and didn't experience the issues I'm having now (see here: https://mikebravo.ch/). The reason it was working then eludes
×