File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -643,18 +643,21 @@ $.extend(Timepicker.prototype, {
643
643
644
644
// fix any grids since sliders are shorter
645
645
var sliderAccessWidth = $tp . find ( '.ui-slider-access:eq(0)' ) . outerWidth ( true ) ;
646
- $tp . find ( 'table:visible' ) . each ( function ( ) {
647
- var $g = $ ( this ) ,
648
- oldWidth = $g . outerWidth ( ) ,
649
- oldMarginLeft = $g . css ( 'marginLeft' ) . toString ( ) . replace ( '%' , '' ) ,
650
- newWidth = oldWidth - sliderAccessWidth ,
651
- newMarginLeft = ( ( oldMarginLeft * newWidth ) / oldWidth ) + '%' ;
646
+ if ( sliderAccessWidth ) {
647
+ $tp . find ( 'table:visible' ) . each ( function ( ) {
648
+ var $g = $ ( this ) ,
649
+ oldWidth = $g . outerWidth ( ) ,
650
+ oldMarginLeft = $g . css ( 'marginLeft' ) . toString ( ) . replace ( '%' , '' ) ,
651
+ newWidth = oldWidth - sliderAccessWidth ,
652
+ newMarginLeft = ( ( oldMarginLeft * newWidth ) / oldWidth ) + '%' ;
652
653
653
- $g . css ( { width : newWidth , marginLeft : newMarginLeft } ) ;
654
- } ) ;
654
+ $g . css ( { width : newWidth , marginLeft : newMarginLeft } ) ;
655
+ } ) ;
656
+ }
655
657
} , 0 ) ;
656
658
}
657
659
// end slideAccess integration
660
+
658
661
}
659
662
} ,
660
663
You can’t perform that action at this time.
0 commit comments