jQuery iosslider 页面滚动
jQuery iosslider Page scroll
我有一个 iosSlider v1.3.43 (06/17/2014),我想使用 .iosSlider('prevPage') 和 .iosSlider('nextPage') 方法,但我不能设法使用这些方法。我认为这很简单,但我无法让它工作。
我阅读了以下 post () 并尝试了 onClick 方法,但仍然没有。
下面是我的代码:
jQuery('#homefeatured .newproducts .carousel').iosSlider({
desktopClickDrag: true,
snapToChildren: true,
infiniteSlider: true,
navNextSelector: '#homefeatured .new-arrow.next',
navPrevSelector: '#homefeatured .new-arrow.prev',
lastSlideOffset: 3,
onFirstSlideComplete: function(){
jQuery('#homefeatured .new-arrow.prev').addClass('disabled');
},
onLastSlideComplete: function(){
jQuery('#homefeatured .new-arrow.next').addClass('disabled');
},
onSlideChange: function(){
jQuery('#homefeatured .new-arrow.next').removeClass('disabled');
},
});
jQuery('#homefeatured .new-arrow.prev').iosSlider('prevPage');
jQuery('#homefeatured .new-arrow.next').iosSlider('nextPage');
我想你错过了事件绑定代码。
见下文..
jQuery('#homefeatured .new-arrow.prev').bind('click',function(){jQuery('#homefeatured .newproducts .carousel').iosSlider('prevPage')});
jQuery('#homefeatured .new-arrow.next').bind('click',function(){jQuery('#homefeatured .newproducts .carousel').iosSlider('nextPage')});
祝你好运~
我有一个 iosSlider v1.3.43 (06/17/2014),我想使用 .iosSlider('prevPage') 和 .iosSlider('nextPage') 方法,但我不能设法使用这些方法。我认为这很简单,但我无法让它工作。
我阅读了以下 post () 并尝试了 onClick 方法,但仍然没有。
下面是我的代码:
jQuery('#homefeatured .newproducts .carousel').iosSlider({
desktopClickDrag: true,
snapToChildren: true,
infiniteSlider: true,
navNextSelector: '#homefeatured .new-arrow.next',
navPrevSelector: '#homefeatured .new-arrow.prev',
lastSlideOffset: 3,
onFirstSlideComplete: function(){
jQuery('#homefeatured .new-arrow.prev').addClass('disabled');
},
onLastSlideComplete: function(){
jQuery('#homefeatured .new-arrow.next').addClass('disabled');
},
onSlideChange: function(){
jQuery('#homefeatured .new-arrow.next').removeClass('disabled');
},
});
jQuery('#homefeatured .new-arrow.prev').iosSlider('prevPage');
jQuery('#homefeatured .new-arrow.next').iosSlider('nextPage');
我想你错过了事件绑定代码。
见下文..
jQuery('#homefeatured .new-arrow.prev').bind('click',function(){jQuery('#homefeatured .newproducts .carousel').iosSlider('prevPage')});
jQuery('#homefeatured .new-arrow.next').bind('click',function(){jQuery('#homefeatured .newproducts .carousel').iosSlider('nextPage')});
祝你好运~