Jump to content
GreenSock

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

robs

ShockinglyGreen
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

3 Newbie

About robs

  • Rank
    Newbie

Recent Profile Visitors

393 profile views
  1. Hi, is it possible to calculate the duration of a tween based on the width of some DOM-Element? I have something like this: someTimeline.to(element, {
 width: 0,
 duration: function () { return anotherElement.clientWidth / 290 }) The tween works fine if I put a number to duration. However with the code above the element disappears without animating. Do you have an idea where my mistake is? Thanks so much, Robert
  2. Sorry, still have a little issue: If I "throw" the content to the left and resize the window to > 768px the two images are shifted to the left (since the inline style still remains). You can reproduce that behavior in my codepen above. I know customers usually don't resize their browser window back and forth but unfortunately there are some devices (like iPhone X) that exceed the 768px viewport width in landscape. I fixed this very simply by resetting the transform property on window resize: window.onresize = function () { document.querySelector($content).styl
  3. Thanks, @GreenSock, now it's working. Btw. the thing you missed was that the codpen was working for me as well. That was actually the strange thing: If I copy-pasted the code from the pen into my local project it stopped working. But now it's all good. Thanks again!
  4. Hi, for me dragClickables is still not working — neither in version 2.0.2 nor in 2.1. I would like to have 2 images turn into a slider if the viewport is < 768px (see attached image). The animation works fine, only the dragClickables doesn't have any effect. If my draggable item is an <a> tag it stops working. The interesting thing about it is: If I copy-paste my code into a codepen (see below) everything works fine. But in my (Laravel-) environment it's not working (unless I turn the <a> into a <div> or something else).
  5. This was the hint I needed. Thanks so much, Carl!
  6. I have a Dropdown Navigation with sub-menu-points that are revealed on click. For this I created a timeline with 2 tweens: A tween that changes the height and opacity of the next menu points A tween that animates the menu points from left to right. The forward animation works fine but the reverse function only reverses the second tween — however without any animation. The first tween isn't reversed at all. Any idea on what I did wrong? Thanks so much.
×