/ Published in: jQuery
I know that there are other ways of displaying a tooltip without the use of JQuery but I like the flexibility and control JQuery provides. This snippet shows how to add a tooltip to a Help icon.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!-- This sets up a button with a help icon next to it --> <input type="button" id="cascade" class="StandardButton" value="Cascade" /> <img id="help" src="~/Images/help_icon.jpg" border="0" /> <!-- This is the jquery code to add a tooltip to the help icon --> $(document).ready(function() { $('#help').tooltip( { delay: 0, bodyHandler: function() { return "Click this button to cascade your selection<br /> from its current level through all levels below."; }, showURL: false }) });