向您的专家寻求帮助...我们的网站正在使用 iosSlider ( https://iosscripts.com/iosslider/ ) 作为移动滑块...但是,在 Chrome Inspector 中,我收到以下错误
Uncaught TypeError: Object [object Object] has no method 'iosSlider'
我已经检查过了,在调用 iosSlider js 之前,jQuery 只在头部加载了一次......这是:
$(document).ready(function() {
/* some custom settings */
$('.iosSlider').iosSlider({
desktopClickDrag: true,
snapToChildren: true,
infiniteSlider: true,
navSlideSelector: '.sliderContainer .slideSelectors .item',
scrollbar: true,
scrollbarContainer: '.sliderContainer .scrollbarContainer',
scrollbarMargin: '0',
scrollbarBorderRadius: '0',
keyboardControls: true
});
});
也试过
$(document).ready(function() {
/* some custom settings */
jQuery('.iosSlider').iosSlider({
desktopClickDrag: true,
snapToChildren: true,
infiniteSlider: true,
navSlideSelector: '.sliderContainer .slideSelectors .item',
scrollbar: true,
scrollbarContainer: '.sliderContainer .scrollbarContainer',
scrollbarMargin: '0',
scrollbarBorderRadius: '0',
keyboardControls: true
});
});
但无济于事..有什么帮助吗?
更新:这就是我们调用库的方式:
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.mobile.custom.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.0.4/js/bootstrap-collapse.js"></script>
<script src="//twitter.github.io/bootstrap/assets/js/bootstrap-carousel.js"></script>
<script src="/js/jquery.iosslider.min.js"></script>
<script src="js/corecalls.js"></script>
iosslider 函数在 corecall.js 中调用