jQuery 1.0.4 - New Wave Javascript(js源文件)

2019-06-03 09:49:42刘景俊

            this.last = this.last == a ? b : a;

            // Make sure that clicks stop
            e.preventDefault();

            // and execute the function
            return this.last.apply( this, [e] ) || false;
        }) :

        // Otherwise, execute the old toggle function
        this._toggle.apply( this, arguments );
    },
    hover: function(f,g) {

        // A private function for haandling mouse 'hovering'
        function handleHover(e) {
            // Check if mouse(over|out) are still within the same parent element
            var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;

            // Traverse up the tree
            while ( p && p != this ) try { p = p.parentNode } catch(e) { p = this; };

            // If we actually just moused on to a sub-element, ignore it
            if ( p == this ) return false;

            // Execute the right function
            return (e.type == "mouseover" ? f : g).apply(this, [e]);
        }

        // Bind the function to the two event listeners
        return this.mouseover(handleHover).mouseout(handleHover);
    },
    ready: function(f) {