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