Skip to content Skip to sidebar Skip to footer

Bootstrap Popover Not Working

I'm trying to implement the bootstrap popover on a website but for some reason it isn't working. The console does not output any errors and I've also made an alert just to check if

Solution 1:

For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.

-- Bootstrap Docs

But if you've covered that, it would seem you need to add an id attr to you a tag:

<a href="#"data-placement="right"data-original-title="Tooltip on right">Stuff</a>

Example

Solution 2:

[EDIT] try the other answer first.

I think you need to have an id to select in your html to reference in your JS

Also, try it without the type='text/javascript' in the body script.

From

<scriptsrc="http://code.jquery.com/jquery-latest.js"></script><scriptsrc="js/bootstrap.js"type="text/javascript"></script><scripttype='text/javascript'>
     $(document).ready(function () {
      alert("Aaaa");
       $('#example').tooltip();
     });
  </script>

to-

<scriptsrc="http://code.jquery.com/jquery-latest.js"></script><scriptsrc="js/bootstrap.js"type="text/javascript"></script><script>
     $(document).ready(function () {
      alert("Aaaa");
       $('#example').tooltip();
     });
  </script>

Solution 3:

This works for all elements at same time.

$("[rel='tooltip']").tooltip();

Post a Comment for "Bootstrap Popover Not Working"