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

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



        ancestors: jQuery.parents,


        parents: jQuery.parents,


        next: "jQuery.sibling(a).next",


        prev: "jQuery.sibling(a).prev",


        siblings: "jQuery.sibling(a, null, true)",


        children: "jQuery.sibling(a.firstChild)"
    },

    each: {

        removeAttr: function( key ) {
            jQuery.attr( this, key, "" );
            this.removeAttribute( key );
        },

        show: function(){
            this.style.display = this.oldblock ? this.oldblock : "";
            if ( jQuery.css(this,"display") == "none" )
                this.style.display = "block";
        },

        hide: function(){
            this.oldblock = this.oldblock || jQuery.css(this,"display");
            if ( this.oldblock == "none" )
                this.oldblock = "block";
            this.style.display = "none";
        },

        toggle: function(){
            jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ].apply( jQuery(this), arguments );
        },

        addClass: function(c){
            jQuery.className.add(this,c);
        },

        removeClass: function(c){
            jQuery.className.remove(this,c);