简体   繁体   中英

Why isn't a jQuery Tools tooltip showing up as a jQuery extension?

I have a Boilerplate 2.0-based page and want to add tooltips. Under the call to load jQuery, I add a call to load the jQuery-tools bundle, and then in js/script.js call:

jQuery(".has-tooltip").tooltip();

The result? No tooltips show up; Chrome's JavaScript console gives:

jQuery('.has-tooltip').tooltip();
script.js:30Uncaught TypeError: Object [object Object] has no method 'tooltip'

So far as I can tell, and from the order of things in index.html, the following happens:

  1. I load jQuery.

  2. I load jQuery Tools, without apparent error.

  3. I call jQuery().tooltip(). This errors out, and doesn't display tooltips.

What can I do to ensure that the Tools extension is being registered to jQuery and I can call jQuery().tooltip(...)?

ATdhvaanckse,

--edit--

It's for a portfolio; the URL is:

http://JonathanHayward.com/portfolio

I've tried to pull things in to local loading (ie removed the CDN jQuery hit); this has not produced observable differences.

首先,你加载jQuery两次,还有两个body和html结束标记,并修复了未定义的Modernizr问题

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM