JQuery UI: How to adjust animation speed ("blind")? (As in "pixels per second")

Is there any way to specify the animation speed toggle('blind')

?

My problem is this: I use it to display dynamic content, so I usually don't know the exact size of the element that should be displayed. Since the animation speed depends on both the duration argument and the size of the element, which is variable, I can't control the speed itself.

My solution: Use obj.toggle('blind', obj.height() / x)

, where x

is the desired speed in pixels per millisecond. Is this solution allowed?

+3


source to share


1 answer


My solution seems to be correct:

Use obj.toggle('blind', obj.height() / x)

where x

is the desired speed in pixels per millisecond.



height()

will always return a meaningful value. This behavior is explained here

+1


source







All Articles