Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

jQuery UI Tooltips show option

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

jQuery UI consists of GUI widgets, visual effects, and themes implemented using jQuery, CSS, and HTML. jQuery UI is great for building UI interfaces for the webpages. jQuery UI tooltip widget helps us to add new themes and allows for customization. In this article, we will see how to use the show option in jQuery UI tooltips. The show option is used to add the animation effect while showing in the jQuery UI tooltips. By default, the value is true.

Syntax:

$(".selector").tooltips(
   { show : true }
);

Parameters:

  • Boolean: If set to false there is no showing effect.
  • Number: The time(ms) after which the tooltip is shown.
  • String: The string is used for the selected effect for showing the tooltip. The effect will be used for showing using the default duration and easing.
  • Object: The tooltip is shown using an object as a value where effect, easing, duration, and delay properties are provided.

Approach:

  • First, add jQuery UI scripts needed for your project.

<link href=”https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css” rel=”stylesheet”>

<script src=”https://code.jquery.com/jquery-1.10.2.js”></script>

<script src=”https://code.jquery.com/ui/1.10.4/jquery-ui.js”></script>

Example 1: The following code demonstrates the setting of the show option with time in ms.

HTML




 

Output:

Example 2: The following code demonstrates the setting of the show option with boolean value.

HTML




 

Output:

                 

Example 3: The following example demonstrates the tooltip show option with the slideDown and folds feature. Refer to the output image for better understanding.

HTML




 

Output:

Reference: https://api.jqueryui.com/category/widgets/


My Personal Notes arrow_drop_up
Last Updated : 25 Feb, 2021
Like Article
Save Article
Similar Reads