Bootstrap .tooltip("toggle") method

BootstrapWeb DevelopmentCSS Framework

Use the tooltip(“toggle”) method in Bootstrap to togle the tooltip.

The tooltip generates on clicking the button shown below −

<button type="button" class="btn btn-info">
  Toggle Tooltip

Toggle the tooltip on button click like the following code snippet −


You can try to run the following code to implement the tooltip(“toggle”) method −


Live Demo

<!DOCTYPE html>
<html lang="en">
    <title>Bootstrap Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="">
    <script src=""></script>
    <script src=""></script>

  <div class="container">
    <a href="#" data-toggle="tooltip" title="Tooltip is visible!">Tooltip will be visible here</a>
     <button type="button" class="btn btn-primary">Show Tooltip</button>
     <button type="button" class="btn btn-default">Hide Tooltip</button>
     <button type="button" class="btn btn-info">Toggle Tooltip</button>


Updated on 17-Jun-2020 15:07:38