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>
MattDionis
  • 3,534
  • 10
  • 51
  • 105

2 Answers2

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>
nalinc
  • 7,375
  • 24
  • 33