I can't get javascript to work with Twitter's Bootstrap.
I've got this
<p> <a href="#" rel="tooltip" title="first tooltip" id="example"> hover over me </a> </p> And I want it to appear as a tooltip.
It won't work, so I added this inside the HEAD:
<script type="text/javascript"> window.onload = function() { if(!window.jQuery) { alert('jQuery not loaded'); } else { $(document).ready(function(){ $('#example').tooltip({'placement':'top', 'trigger' : 'hover'}); }); } } Noting thta it still wasn't working, I've deleted all script reference inside the page and added only this inseide the HEAD:
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script src="https://github.com/twitter/bootstrap/blob/master/js/bootstrap-tooltip.js"></script> I´m not calling any particular file that I've downloadad, but hotlinking the original ones, and still the tooltip won't appear.
Note: I´m trying to set a new Drupal theme, so my site is inside Drupal (and the page is a tpl.php file).
Thanks for your insight!!