slideup and slidedown with damper effect
-
12-12-2019 - |
Question
Is there a jQuery add on that has slideUp
and slideDown
effects with damper effect? That is, the change of size starts with a rather quick speed, and slows down towards the end of the movement.
Solution
You can pass in an easing to use as a second argument...
$("#something").slideDown(500, "linear");
jQuery includes swing
and linear
, with the former being the default.
To get the behaviour you describe, use easeOut
, which is available in jQuery UI (which you've tagged the question).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow