File tree 1 file changed +11
-15
lines changed
1 file changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -341,8 +341,7 @@ $.widget( "ui.accordion", {
341
341
var self = this ,
342
342
options = self . options ,
343
343
toShow = data . newContent ,
344
- toHide = data . oldContent ,
345
- down = toShow . length && ( ! toHide . length || ( toShow . index ( ) < toHide . index ( ) ) ) ;
344
+ toHide = data . oldContent ;
346
345
347
346
self . running = true ;
348
347
function complete ( ) {
@@ -351,27 +350,24 @@ $.widget( "ui.accordion", {
351
350
352
351
if ( options . animated ) {
353
352
var animations = $ . ui . accordion . animations ,
354
- easing = options . animated ;
353
+ animation = options . animated ,
354
+ additional ;
355
355
356
- if ( easing && ! animations [ easing ] && ! $ . easing [ easing ] ) {
357
- easing = "slide" ;
358
- }
359
- if ( ! animations [ easing ] ) {
360
- animations [ easing ] = function ( options ) {
361
- this . slide ( options , {
362
- easing : easing ,
363
- duration : 700
364
- } ) ;
356
+ if ( ! animations [ animation ] ) {
357
+ additional = {
358
+ easing : $ . easing [ animation ] ? animation : "slide" ,
359
+ duration : 700
365
360
} ;
361
+ animation = "slide" ;
366
362
}
367
363
368
- animations [ easing ] ( {
364
+ animations [ animation ] ( {
369
365
toShow : toShow ,
370
366
toHide : toHide ,
371
367
complete : complete ,
372
- down : down ,
368
+ down : toShow . length && ( ! toHide . length || ( toShow . index ( ) < toHide . index ( ) ) ) ,
373
369
autoHeight : options . heightStyle !== "content"
374
- } ) ;
370
+ } , additional ) ;
375
371
} else {
376
372
toHide . hide ( ) ;
377
373
toShow . show ( ) ;
You can’t perform that action at this time.
0 commit comments