Get the App
SLTechnology News&Howtos  ›  Development  › 

How to add Bootstrap tooltips to icons

Shulou Source: shulou.com Published: 2022-06-01 03:55:24 09月22日 Update

Most people do not understand the knowledge points of this article "how to add Bootstrap tooltips to icons", so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to add Bootstrap tooltips to icons" article.

Answer: use the Bootstrap.tooltip () method

You can apply Bootstrap tooltips on Glyphicons as you would on other elements. First, add the attribute data-toggle= "tooltip" of the data, and then use the icon element, and finally initialize the tooltip method using the boot. Data-original-title= "Text" .tooltip ()

In addition, if you want to link them to something or perform some actions on it, you can also place these icons within that element. Let's look at an example:

Try this code for example »

Adding Bootstrap Tooltip to Icons

$(document) .ready (function () {

$('[data-toggle= "tooltip"]'). Tooltip ({

Placement: 'top'

});

});

The above is about the content of this article on "how to add Bootstrap tooltips to icons". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.

Tags: Icons tools tips content elements articles methods knowledge articles code values examples most of them attributes data more steps knowledge points industry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Xiaomi macOS Huawei Docker