Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeError: $(...).popover is not a function bootstrap issues

I want to use the Bootstrap popover, but I keep getting this error in firebug:

TypeError: $(...).popover is not a function

This is how I load it all:

  <a id="example" class="btn btn-success" data-original-title="Twitter Bootstrap Popover" data-content="It's so simple to create a tooltop for my website!" rel="popover" href="#">abc</a>


  <script src="js/modernizr-2.6.2-respond-1.1.0.min.js"></script>
  <script src="js/bootstrap.js"></script>
  <script src="js/jquery-1.9.0.js"></script>

  <script>
     setTimeout(function (){ $("#example").popover("show");},4000);
  </script>';
like image 631
John Doe Avatar asked Apr 10 '13 17:04

John Doe


1 Answers

This is what worked for me, I changed the order of jQuery and bootsrap libraries. Also, I am using the libraries from a CDN. That should make no difference.

<a id="example" class="btn btn-success" data-original-title="Twitter Bootstrap Popover" data-content="It's so simple to create a tooltop for my website!" rel="popover"   href="#">abc</a>     <script src="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>   <script src="http:////cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>   <script src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>     <script>      setTimeout(function (){ $("#example").popover("show");},4000);   </script> 
like image 165
Sid Avatar answered Sep 19 '22 03:09

Sid