Apparently you can add a Twitter Bootstrap tooltip to any element that has the .tooltip
class, like so:
$(document).ready(function() {
$("a[rel='tooltip'], .tooltip").tooltip();
});
However, adding this class to a span tag does not seem to work. Example:
<p>1 + 1 = <span class="tooltip" title="Wooo!">2</span></p>
Only links seem to work with tooltips. Example:
<p>2 + 2 = <a href="#" rel="tooltip" title="Wooo!">4</a></p>
Here's a jsFiddle to demonstrate: http://jsfiddle.net/ZznzE/
So how can I display a tooltip for text wrapped in a span?