【发布时间】:2016-04-03 01:26:07
【问题描述】:
试过这个JS-FIDDLE 但没有成功。有人可以帮忙吗,如何为此滑块启用键盘导航。
_toggleNavControls : function() {
// if the current item is the first one in the list, the left arrow is not shown
// if the current item is the last one in the list, the right arrow is not shown
switch( this.current ) {
case 0 : this.$navNext.show(); this.$navPrev.hide(); break;
case this.itemsCount - 1 : this.$navNext.hide(); this.$navPrev.show(); break;
default : this.$navNext.show(); this.$navPrev.show(); break;
}
// highlight navigation dot
this.$navDots.eq( this.old ).removeClass( 'cbp-fwcurrent' ).end().eq( this.current ).addClass( 'cbp-fwcurrent' );
}
任何帮助将不胜感激。
【问题讨论】:
-
键盘导航是什么意思?你想通过键盘上的箭头来控制滑块吗??
-
绝对!我想用键盘和鼠标控制我的幻灯片。 @Anas Omar
标签: javascript jquery css slider keyboard-navigation