Categories
JavaScript Answers

How to enable Bootstrap tooltip on disabled button with HTML?

Spread the love

To enable Bootstrap tooltip on disabled button with HTML, we wrap the disabled button with a wrapper element.

For instance, we write

<div class="tooltip-wrapper" data-title="hello world">
  <button class="btn btn-default" disabled>button disabled</button>
</div>

to wrap a div with the data-title attribute with the tooltip text with class tooltip-wrapper around the disabled button to show the tooltip when hovering over the disabled button.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *