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

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

                    handlers[0] = element["on" + type];
            }

            // Add the function to the element's handler list
            handlers[handler.guid] = handler;

            // And bind the global event handler to the element
            element["on" + type] = this.handle;

            // Remember the function in a global list (for triggering)
            if (!this.global[type])
                this.global[type] = [];
            this.global[type].push( element );
        },

        guid: 1,
        global: {},

        // Detach an event or set of events from an element
        remove: function(element, type, handler) {
            if (element.events)
                if (type && element.events[type])
                    if ( handler )
                        delete element.events[type][handler.guid];
                    else
                        for ( var i in element.events[type] )
                            delete element.events[type][i];
                else