The tooltip plugin is a little pop-up box that appears when the user moves the mouse pointer over an element.
Tip: Plugins can be added individually (via Bootstrap’s “tooltip.js” file) or all at once (“bootstrap.js” or “bootstrap.min.js”).
To add a tooltip, use the data-toggle=”tooltip” attribute to an element.
Use the title element to provide the text that should be displayed under the tooltip:
Tooltips must be initialized using jQuery: pick the desired element and call the tooltip() method.
The code below will enable all tooltips in the document:
By default, the tooltip appears on top of the element.
The data-placement attribute can be used to put the tooltip on the top, bottom, left, or right side of the element:
Tip: You can also use the data-placement attribute with the value “auto” to let the browser determine the position of the tooltip. For example, if the value is “auto left”, the tooltip will appear on the left side when possible, otherwise on the right.
CodingAsk.com is designed for learning and practice. Examples may be made simpler to aid understanding. Tutorials, references, and examples are regularly checked for mistakes, but we cannot guarantee complete accuracy. By using CodingAsk.com, you agree to our terms of use, cookie, and privacy policy.
Copyright 2010-2024 by Refsnes Data. All Rights Reserved.