Reputation: 833
Im attempting to use both bootstrap Popover and Tooltip. Tooltip displays correctly as a hover until the popover is clicked which appears momenterly before disapearing at which point the tooltip stops working.
This is using Ruby-on-Rails 4 if that makes any difference.
Application.js:
//= require bootstrap
//= require bootstrap-tooltip
//= require bootstrap-popover
$(document).ready(function () {
$('[rel=tooltip]').tooltip({ placement : 'right' });
$('[rel=popover]').popover();
});
vew:
<a href="#" rel="tooltip" data-original-title="first tooltip">
<i class="icon-question-sign"></i>
</a>
<a href="#" rel="popover" data-original-title="first popover" data-content="this is some popover data">
<i class="icon-question-sign"></i>
</a>
Upvotes: 0
Views: 1057
Reputation: 833
Turns out it was a Rails 4 issue with turbolinks resolved it by changing the JavaScript to:
var ready = function () {
$('[rel=tooltip]').tooltip({ placement : 'right',
container: 'body' });
$('[rel=popover]').popover();
};
$(document).ready(ready);
$(document).on('page:load', ready);
Upvotes: 1