jQ源码之animate

来源:互联网 发布:华为算法工程师好进吗 编辑:程序博客网 时间:2024/06/05 06:02
isEmptyObject: function( obj ) {        var name;        for ( name in obj ) {            return false;        }        return true;    }  //判断是否为空对象animate: function( prop, speed, easing, callback ) {        var empty = jQuery.isEmptyObject( prop ),            optall = jQuery.speed( speed, easing, callback ),            doAnimation = function() {                // Operate on a copy of prop so per-property easing won't be lost                var anim = Animation( this, jQuery.extend( {}, prop ), optall );                // Empty animations, or finishing resolves immediately                if ( empty || dataPriv.get( this, "finish" ) ) {                    anim.stop( true );                }            };            doAnimation.finish = doAnimation;        return empty || optall.queue === false ?            this.each( doAnimation ) :            this.queue( optall.queue, doAnimation );    },
0 0