I need to display a tooltip on disabled button and remove it on enabled button. Actually it works in reverse way.
What is the best way to invert this behaviour?
$('[rel=tooltip]').tooltip();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<hr>
<button class="btn" disabled rel="tooltip" data-title="Dieser Link führt zu Google">button disabled</button>
<button class="btn" rel="tooltip" data-title="Dieser Link führt zu Google">button not disabled</button>
Here is the demo: http://jsfiddle.net/BA4zM/68/
P.S.: I want to keep the attribute disabled.
For Bootstrap 3
HTML
CSS
JS
In my case, none of the above solutions worked. I found that it's easier to overlap the disabled button using an absolute element as:
Demo