嗨,当我在控制台中安装 worpdress 和带有 slider 的模板时,出现此错误: TypeError: jQuery("#slider-full").revolution 不是函数。 (在'jQuery("#slider-full").revolution'中,'jQuery("#slider-full").revolution'未定义)我现在应该做什么?
jQuery("#slider-full").revolution({
sliderType:"standard",
sliderLayout:"fullscreen",
dottedOverlay:"none",
delay:9000,
navigation: {
keyboardNavigation:"off",
keyboard_direction: "horizontal",
mouseScrollNavigation:"off",
onHoverStop:"off",
touch:{
touchenabled:"on",
swipe_threshold: 75,
swipe_min_touches: 50,
swipe_direction: "horizontal",
drag_block_vertical: false
}
,
arrows: {
style:"",
enable:true,
hide_onmobile:false,
hide_onleave:true,
hide_delay:200,
hide_delay_mobile:1200,
tmp:'',
left: {
h_align:"left",
v_align:"center",
h_offset:20,
v_offset:0
},
right: {
h_align:"right",
v_align:"center",
h_offset:20,
v_offset:0
}
}
,
bullets: {
enable:true,
hide_onmobile:true,
hide_under:769,
style:"",
hide_onleave:false,
direction:"horizontal",
h_align:"right",
v_align:"top",
h_offset:60,
v_offset:40,
space:5,
tmp:'<span class="tp-bullet-image"></span><span class="tp-bullet-title"></span>'
}
},
responsiveLevels:[1240,1024,778,480],
visibilityLevels:[1240,1024,778,480],
gridwidth:[1240,1024,778,480],
gridheight:[868,768,960,720],
lazyType:"none",
parallax: {
type:"scroll",
origo:"slidercenter",
speed:400,
levels:[5,10,15,20,25,30,35,40,45,46,47,48,49,50,51,55],
type:"scroll",
},
shadow:0,
spinner:"spinner2",
stopLoop:"off",
stopAfterLoops:-1,
stopAtSlide:-1,
shuffle:"off",
autoHeight:"off",
fullScreenAutoWidth:"off",
fullScreenAlignForce:"off",
fullScreenOffsetContainer: "",
fullScreenOffset: "",
disableProgressBar:"on",
hideThumbsOnMobile:"off",
hideSliderAtLimit:0,
hideCaptionAtLimit:0,
hideAllCaptionAtLilmit:0,
debugMode:false,
fallbacks: {
simplifyAll:"off",
nextSlideOnWindowFocus:"off",
disableFocusListener:false,
}
});
最佳答案
这意味着您的 RevolutionSlider
未正确包含在页面中,或者它是在调用它之后包含的。
您必须在管理面板中检查此插件是否已安装并成功打开。
如果是,您可以尝试在控制台中运行 jQuery("#slider-full").revolution({});
以检查 slider 是否未包含在后面的代码中;
关于javascript - TypeError: jQuery ("#slider-full").revolution 不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34858533/