I'm using a theme based on Bootstrap 3.
I want to use Tooltip and Popover features that come with Bootstrap but I couldn't.
It's said on the Bootstrap Javascript page that:
Opt-in functionality
For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning you must initialize them yourself.
One way to initialize all tooltips on a page would be to select them by their data-toggle attribute:
$(function () { $('[data-toggle="tooltip"]').tooltip() })
I tried to add the code above to my node.tpl.php (inside of tags) but it didn't work. I also tried to save that code as script.js and added it to my theme info file but it didn't work.
How can I enable these features? Where to use the above code?
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</button>