Jump to content


  • Posts

  • Joined

  • Last visited


0 Newbie
  1. You guys are rockstars. Thanks for the help!
  2. Thanks for the reply. I know I can do that, but it's not what I want. If I call these methods on the nested timeline directly, it returns the time relative to the nested timeline. I need the time relative to the parent timeline. Granted, in my simple example, they would be the same time since there are no other offsets. I've updated the original fiddle to add delays to the parent and nested timeline. What I would like is to get the the value of 10 back (where the label falls in the overall timeline), but all I am able to retrieve is the value of 5 by querying the nested timeline.
  3. getLabelTime and getLabelsArray do not seem to return the labels of nested timelines though. Check out this fiddle: http://jsfiddle.net/brettm523/fa7Wd/ I've tried calling these methods on the nested timeline directly, but that gets me the time relative to the nested timeline, not the parent timeline.
  4. Ack, I totally missed that! Was just looking in the main docs. Time to refactor!
  5. Have you considered adding the ability to tween between css classes? Instead of specifying css properties in the tween, you could specify a css selector and it would tween anything defined in that class/id. It would clean up the code and encourage reusability. For instance, I have a lot of places where I'm tweening different elements to an "on" state. I've defined the properties of that tween in a variable that I pass to each tween, but this seems like it would be more naturally handled in CSS. It would also easily allow fallbacks to just toggling classes.
  6. Is there an easy way to get the time of a label in a nested timeline?
  7. Thanks Jack. If more people run into this, even a quick note in the documentation highlighting the difference could be sufficient.
  8. Looks like we ran into the same confusion around the same time I propose either different names for these or having a uniquely named method that handles the get. It's confusing to have a 'get' return a different value than its corresponding 'set'. In either case, is there currently a method that returns the value I'm expecting? My real world use case isn't as academic as that fiddle. The durations I'm setting are calculated dynamically and I need to retrieve them at a later point in time. For now, I'm stashing them in an array but it would be nice to be able to query the timelines for them.
  9. In the fiddle below I am creating a simple tween in a TimelineMax instance. I change the totalDuration from 1 to 5 and then alert the value of totalDuration(). I expect to get 5 returned but I am still seeing the original value of 1. The duration does update correctly (the tween slows down) but the return value does not reflect this. http://jsfiddle.net/brettm523/Ry4BZ/
  10. Works great! Thanks for the quick response.
  11. Some further clarification. It appears to be specific to .from(). If I use .to() it remains a percent after completion. Changing to position absolute from position fixed makes no difference either. Also seeing this in IE9. Unfortunately, I can work around this using .to() because I'm using media queries for a responsive design and I need the end positions to be defined there.
  12. I am tweening a fixed position div's left position between two percent values using .from(). During the tween it acts as expected and tweens the percents. However, in Firefox, once the tween completes, the percent value is converted to a pixel value. This does not happen in Chrome. http://jsfiddle.net/brettm523/wX463/