0

I'm using jQuery to load gapi (so my app has the ability to log a user out using their Google+ account). I've loaded jQuery in the head of my index.html, but it doesn't seem to be getting picked up as I get the following error in the console: Uncaught TypeError: $(...).tooltip is not a function.

This is the script I'm attempting to run at the end of my body:

  <script>
    (function() {
      $('#button-address').tooltip();
      var po = document.createElement('script');
      po.type = 'text/javascript';
      po.async = true;
      po.src = 'https://apis.google.com/js/client:plusone.js';
      var s = document.getElementsByTagName('script')[0];
      s.parentNode.insertBefore(po, s);
    })();
  </script>
</body>

and in the head:

<script src='../../bower_components/jquery/dist/jquery.min.js'></script>
3
  • If jQuery weren't loaded, I would think it would error on $() instead of on tooltip(). So perhaps that error is correct, and tooltip is not a function Commented Jul 21, 2015 at 11:27
  • Is your reference before angular? Commented Jul 21, 2015 at 11:27
  • not loaded the jquery ui or ui-bootstrap js Commented Jul 21, 2015 at 11:27

2 Answers 2

0

tooltip() is a part of jQuery UI not the core jQuery library.

Include the script for jQuery UI (along with jQuery)

<script src='https://code.jquery.com/ui/1.11.3/jquery-ui.min.js'></script>
Sign up to request clarification or add additional context in comments.

Comments

0

SO have lot of answer for this same issue

.tooltip() is not a function

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

jQuery tooltip is not working

$(...).tooltip is not working since jQuery 1.9.2 is not working due to old jQuery UI 1.8.16 library? How to fix this?

How to add and show a Bootstrap tooltip inside a jQuery click function?

More Details for click here

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.