Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

tooltip

<html>
<head>
  <meta charset="utf-8">
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  <link href="https://ajax.aspnetcdn.com/ajax/jquery.ui/1.12.1/themes/start/jquery-ui.css" rel="stylesheet"/>
  <script>
    $(function(){
        //$("#NameID").tooltip();//shows only for tet field
        $(document).tooltip();// for all dom elements having  title attribute shows tooltip widget
        
        //content option to display tooltip
        $("#NameID").tooltip({
            //content: '<b>Content:</b>this will override the native title'
            content : getTooltip, // tooltip by calling function
            track : true,
            show:{delay:10, duration:500, effect:'explode'}, //millisesc 
            hide: { delay:10, duration:100, effect:'slideDown'}
        });
        
        
        
    });
    function getTooltip(){
        return 'tooltip from function'
    }
  </script>
</head>
<body>
   <form>
       <label title="Name">Name:</label>
       <input title="Name here" type="text" id="NameID" />
   </form>
</body>
</html>

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.