Why is your .tooltip()
call outside of your jQuery()
function? This will mean the .tooltip()
call will execute as soon as that line is parsed by your browser, not when the DOM is loaded. Do this instead:
jQuery(function () {
$("img[rel='tooltip']").tooltip();
$("[data-toggle='tooltip']").tooltip();
});
Also, make sure this script is placed AFTER both the jQuery and Bootstrap .js files are loaded.
Edit: Or if you're feeling thrifty, combine your jQuery selectors so you only make one .tooltip()
call:
jQuery(function () {
$("img[rel='tooltip'], [data-toggle='tooltip']").tooltip();
});