File tree Expand file tree Collapse file tree 1 file changed +11
-15
lines changed
Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -341,8 +341,7 @@ $.widget( "ui.accordion", {
341341 var self = this ,
342342 options = self . options ,
343343 toShow = data . newContent ,
344- toHide = data . oldContent ,
345- down = toShow . length && ( ! toHide . length || ( toShow . index ( ) < toHide . index ( ) ) ) ;
344+ toHide = data . oldContent ;
346345
347346 self . running = true ;
348347 function complete ( ) {
@@ -351,27 +350,24 @@ $.widget( "ui.accordion", {
351350
352351 if ( options . animated ) {
353352 var animations = $ . ui . accordion . animations ,
354- easing = options . animated ;
353+ animation = options . animated ,
354+ additional ;
355355
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
365360 } ;
361+ animation = "slide" ;
366362 }
367363
368- animations [ easing ] ( {
364+ animations [ animation ] ( {
369365 toShow : toShow ,
370366 toHide : toHide ,
371367 complete : complete ,
372- down : down ,
368+ down : toShow . length && ( ! toHide . length || ( toShow . index ( ) < toHide . index ( ) ) ) ,
373369 autoHeight : options . heightStyle !== "content"
374- } ) ;
370+ } , additional ) ;
375371 } else {
376372 toHide . hide ( ) ;
377373 toShow . show ( ) ;
You can’t perform that action at this time.
0 commit comments