Changeset 40375
- Timestamp:
- 04/04/2017 06:51:39 AM (7 years ago)
- Location:
- branches/4.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
-
branches/4.7/src/wp-admin/js/customize-controls.js
r40345 r40375 529 529 * @since 4.1.0 530 530 * 531 * @param {Boolean} active 532 * @param {Object} args 533 * @param {Object} args.duration 534 * @param {Object} args.completeCallback 531 * @param {boolean} active - The active state to transiution to. 532 * @param {Object} [args] - Args. 533 * @param {Object} [args.duration] - The duration for the slideUp/slideDown animation. 534 * @param {boolean} [args.unchanged] - Whether the state is already known to not be changed, and so short-circuit with calling completeCallback early. 535 * @param {Function} [args.completeCallback] - Function to call when the slideUp/slideDown has completed. 535 536 */ 536 537 onChangeActive: function( active, args ) { … … 565 566 } 566 567 567 if ( ! $.contains( document, headContainer ) ) {568 // jQuery.fn.slideUp is not hiding an element if it is not in the DOM568 if ( ! $.contains( document, headContainer.get( 0 ) ) ) { 569 // If the element is not in the DOM, then jQuery.fn.slideUp() does nothing. In this case, a hard toggle is required instead. 569 570 headContainer.toggle( active ); 570 571 if ( args.completeCallback ) { … … 572 573 } 573 574 } else if ( active ) { 574 headContainer.s top( true, true ).slideDown( duration, args.completeCallback );575 headContainer.slideDown( duration, args.completeCallback ); 575 576 } else { 576 577 if ( construct.expanded() ) { … … 578 579 duration: duration, 579 580 completeCallback: function() { 580 headContainer.s top( true, true ).slideUp( duration, args.completeCallback );581 headContainer.slideUp( duration, args.completeCallback ); 581 582 } 582 583 }); 583 584 } else { 584 headContainer.s top( true, true ).slideUp( duration, args.completeCallback );585 headContainer.slideUp( duration, args.completeCallback ); 585 586 } 586 587 }
Note: See TracChangeset
for help on using the changeset viewer.