Skip to content
Related Articles

Related Articles

jQuery UI Tooltips content Option

View Discussion
Improve Article
Save Article
  • Last Updated : 19 Feb, 2021
View Discussion
Improve Article
Save 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 content option in tooltip.
content option is used to add some content in the tooltip.


$( ".selector" ).tooltips(
   { content: "GeeksforGeeks!" }


  • string: The value you want to insert in the tooltip.

Approach: First, add jQuery UI scripts needed for your project.

<link href=”” rel=”stylesheet”>
<script src=””></script>
<script src=””></script>

Example: The following example demonstrates the content option for the tooltip.


<!doctype html>
<html lang="en">
    <meta charset="utf-8">
    <link href=
    <h1 style="color:green;">
        jQuery UI | Tooltip content option
        $(function () {
                content: "GeeksforGeeks!"
    <label for="name">Name:</label>
    <input id="gfg1" title="GeeksforGeeks">
    <p><a id="gfg2" href="" title="GeeksforGeeks">
        Click here!



My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!