| 8789 | }); |
| 8790 | |
| 8791 | function defaultPrefilter( elem, props, opts ) { |
| 8792 | var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire, |
| 8793 | anim = this, |
| 8794 | style = elem.style, |
| 8795 | orig = {}, |
| 8796 | handled = [], |
| 8797 | hidden = elem.nodeType && isHidden( elem ); |
| 8798 | |
| 8799 | // handle queue: false promises |
| 8800 | if ( !opts.queue ) { |
| 8801 | hooks = jQuery._queueHooks( elem, "fx" ); |
| 8802 | if ( hooks.unqueued == null ) { |
| 8803 | hooks.unqueued = 0; |
| 8804 | oldfire = hooks.empty.fire; |
| 8805 | hooks.empty.fire = function() { |
| 8806 | if ( !hooks.unqueued ) { |
| 8807 | oldfire(); |
| 8808 | } |
| 8809 | }; |
| 8810 | } |
| 8811 | hooks.unqueued++; |
| 8812 | |
| 8813 | anim.always(function() { |
| 8814 | // doing this makes sure that the complete handler will be called |
| 8815 | // before this completes |
| 8816 | anim.always(function() { |
| 8817 | hooks.unqueued--; |
| 8818 | if ( !jQuery.queue( elem, "fx" ).length ) { |
| 8819 | hooks.empty.fire(); |
| 8820 | } |
| 8821 | }); |
| 8822 | }); |
| 8823 | } |
| 8824 | |
| 8825 | // height/width overflow pass |
| 8826 | if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { |
| 8827 | // Make sure that nothing sneaks out |
| 8828 | // Record all 3 overflow attributes because IE does not |
| 8829 | // change the overflow attribute when overflowX and |
| 8830 | // overflowY are set to the same value |
| 8831 | opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; |
| 8832 | |
| 8833 | // Set display property to inline-block for height/width |
| 8834 | // animations on inline elements that are having width/height animated |
| 8835 | if ( jQuery.css( elem, "display" ) === "inline" && |
| 8836 | jQuery.css( elem, "float" ) === "none" ) { |
| 8837 | |
| 8838 | // inline-level elements accept inline-block; |
| 8839 | // block-level elements need to be inline with layout |
| 8840 | if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { |
| 8841 | style.display = "inline-block"; |
| 8842 | |
| 8843 | } else { |
| 8844 | style.zoom = 1; |
| 8845 | } |
| 8846 | } |
| 8847 | } |
| 8848 | |