我有一个小问题,但我不知道如何解决我用不同的设置制作了一个脚本,但我收到一个错误
$(function() {
$(".basket").hide();
$(".opened").click(function(){
$(".basket").slideToggle();
$(".opened").toggleClass('active');
});
$(".black-block .showed").click(function(e){
$(".black-block").find(".caption").slideToggle();
$(".showed a").toggleClass('active');
});
$(".carousel").jCarouselLite({
btnNext: "#c1r",
btnPrev: "#c1l",
easing: "easeOutQuad",
visible: 5,
});
var currentSlide = 1;
var currentPage = 0;
$('#slideshow').slides({
preload: true,
preloadImage: 'img/loading.gif',
effect: 'slide',
crossfade: true,
play: 5000,
slideSpeed: 350,
fadeSpeed: 500,
generateNextPrev: true,
generatePagination: false,
animationStart: function(current){
$('').animate({
bottom:-155
},100);
if (window.console && console.log) {
// example return of current slide number
console.log('animationStart on slide: ', current);
};
},
animationComplete: function(current){
$('').animate({
bottom:0
},200);
if (window.console && console.log) {
// example return of current slide number
console.log('animationComplete on slide: ', current);
};
var newPage = Math.floor(currentSlide / 6);
if (newPage > currentPage) { // Page must be greater
$('#c1r').trigger('click');
}
else (newPage < currentPage) { // Page must be less
$('#c1l').trigger('click');
}
currentPage = newPage;
currentSlide = current;
},
slidesLoaded: function() {
$('').animate({
bottom:0
},200);
}
});
根据Firebug,错误应该在这里:
else (newPage < currentPage) { // Page must be less
$('#c1l').trigger('click');
由于我不知道,如果有人可以提示我出了什么问题,那就太棒了。先感谢您。