File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change 9999
100100 this . setSelectedCount = $ . proxy ( function ( )
101101 {
102- $ ( "thead tr td span .griddly-selection-count" , this . $element ) . text ( Object . keys ( this . options . selectedRows ) . length ) ;
102+ $ ( ".griddly-selection-count" , this . $element ) . text ( Object . keys ( this . options . selectedRows ) . length ) ;
103103
104104 if ( ! $ . isEmptyObject ( this . options . selectedRows ) )
105105 {
106- this . $element . find ( "span.griddly-selection:not(:visible)" ) . animate ( { width : "show" } , 350 ) ;
106+ var el = this . $element . find ( ".griddly-selection:not(:visible)" ) ;
107+
108+ if ( el . is ( "span" ) )
109+ el . animate ( { width : "show" } , 350 ) ;
110+ else
111+ el . show ( 350 ) ;
112+
107113 $ ( this . $element ) . find ( "[data-enable-on-selection=true]" ) . removeClass ( "disabled" ) ;
108114 }
109115 else
110116 {
111- this . $element . find ( "span.griddly-selection:visible" ) . animate ( { width : "hide" } , 350 ) ;
117+ var el = this . $element . find ( ".griddly-selection:visible" ) ;
118+
119+ if ( el . is ( "span" ) )
120+ el . animate ( { width : "hide" } , 350 ) ;
121+ else
122+ el . hide ( 350 ) ;
123+
112124 $ ( this . $element ) . find ( "[data-enable-on-selection=true]" ) . addClass ( "disabled" ) ;
113125 }
114126
431443 this . $element . find ( "input[name=_rowselect]" ) . prop ( "checked" , true ) . each ( function ( ) { setRowSelect ( $ ( this ) ) ; } ) ;
432444 } , this ) ) ;
433445
434- $ ( this . $element ) . on ( "click" , "thead tr .griddly-selection-clear" , $ . proxy ( function ( event )
446+ $ ( this . $element ) . on ( "click" , ".griddly-selection-clear" , $ . proxy ( function ( event )
435447 {
436448 this . clearSelected ( ) ;
437449 } , this ) ) ;
13051317 }
13061318 } ;
13071319
1308- // $("[data-role=griddly]").griddly();
1320+ $ ( "[data-role=griddly]" ) . griddly ( ) ;
13091321
13101322 $ ( function ( )
13111323 {
You can’t perform that action at this time.
0 commit comments