Show and Hide jQuery UI Tooltip with Animation
Related Post:
jQuery UI Tooltip widget provides 2 options to animate the tooltip while showing and hiding.
- show: When set to false, no animation and the tooltip will be shown immediately. When set to true, the tooltip will fade in with the default duration and the default easing.
- hide: When set to false, no animation and the tooltip will be hidden immediately. When set to true, the tooltip will fade out with the default duration and the default easing.
So, below jQuery code will show the tooltip using "slidedown" effect with the delay of 250 ms.
$("#aSlideDown").tooltip({ show: { effect: "slideDown", delay: 250 } });
As I mentioned earlier, different animation effect can be provided while showing and hiding the tooltip. So below jQuery code will show tooltip using "fold" effect and hide using "shake" effect.
$("#aFoldandShake").tooltip({ show: { effect: "fold", delay: 250 }, hide: { effect: "shake", delay: 250 } });
See result below
You can use any of the below value for effect property.
- blind
- bounce
- clip
- drop
- explode
- fade
- fold
- highlight
- puff
- pulsate
- scale
- shake
- size
- slideDown
Feel free to contact me for any help related to jQuery, I will gladly help you.