Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
217 views
in Technique[技术] by (71.8m points)

javascript - jQuery issue - #<an Object> has no method

I've tried a veriety of jQuery plugins recently and I keep getting this error …

has no method
(source: shaunbellis.co.uk)

… regardless of what plugin I try to use.

I've checked the links to the JS files which are all there and working fine. I'm using Drupal if that makes any difference.

I've run the plugins away from the main site to demonstrate that they are working and that I am doing things right with 100% success.

Any ideas?

Update:

My jQuery file called in the footer:

$(document).ready(function() {          

$('#footer_holder').hide();

// Fancy Box
$("a.fancybox").fancybox({
    'hideOnContentClick': true,
    'titlePosition' : 'over',
    'transitionIn'  :   'elastic',
    'transitionOut' :   'elastic',
    'speedIn'       :   600, 
    'speedOut'      :   200, 
    'overlayShow'   :   false,
});

$("#homepage_slider").easySlider({
    auto: true, 
    continuous: true,
});

});

*note - fancy box works fine (unless the easySlider code is above it). jQuery is sorted out by Drupal. I'm running version 1.4

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This problem can also arise if you include jQuery more than once.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...