File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 192192 } ;
193193 } ) ;
194194
195- // next/prev buttons
196- var prev = find ( root , conf . prev ) . click ( function ( ) { self . prev ( ) ; } ) ,
197- next = find ( root , conf . next ) . click ( function ( ) { self . next ( ) ; } ) ;
198-
199195 // circular loop
200- if ( conf . circular && self . getSize ( ) > 1 ) {
196+ if ( conf . circular ) {
201197
202198 var cloned1 = self . getItems ( ) . slice ( - 1 ) . clone ( ) . prependTo ( itemWrap ) ,
203199 cloned2 = self . getItems ( ) . eq ( 1 ) . clone ( ) . appendTo ( itemWrap ) ;
229225
230226 // seek over the cloned item
231227 self . seekTo ( 0 , 0 , function ( ) { } ) ;
232-
233- } else if ( ! conf . circular && self . getSize ( ) > 1 ) {
228+ }
229+
230+ // next/prev buttons
231+ var prev = find ( root , conf . prev ) . click ( function ( ) { self . prev ( ) ; } ) ,
232+ next = find ( root , conf . next ) . click ( function ( ) { self . next ( ) ; } ) ;
233+
234+ if ( ! conf . circular && self . getSize ( ) > 1 ) {
234235
235236 self . onBeforeSeek ( function ( e , i ) {
236237 setTimeout ( function ( ) {
244245 if ( ! conf . initialIndex ) {
245246 prev . addClass ( conf . disabledClass ) ;
246247 }
247- } else { // the case where there is one or zero items
248- prev . addClass ( conf . disabledClass ) ;
249- next . addClass ( conf . disabledClass ) ;
250248 }
251249
252250 // mousewheel support
You can’t perform that action at this time.
0 commit comments