jQuery 1.0.4 New Wave Javascript(js源文件)

2020-05-19 07:32:46易采站长站整理

        “>|/”, “jQuery.sibling(a.firstChild)”,
        “+”, “jQuery.sibling(a).next”,
        “~”, function(a){
            var s = jQuery.sibling(a);
            return s.n >= 0 ? s.slice(s.n+1) : [];
        }
    ],
    find: function( t, context ) {
        // Make sure that the context is a DOM Element
        if ( context && context.nodeType == undefined )
            context = null;
        // Set the correct context (if none is provided)
        context = context || document;
        if ( t.constructor != String ) return [t];
        if ( !t.indexOf(“//”) ) {
            context = context.documentElement;
            t = t.substr(2,t.length);
        } else if ( !t.indexOf(“/”) ) {
            context = context.documentElement;
            t = t.substr(1,t.length);
            // FIX Assume the root element is right ????
            if ( t.indexOf(“/”) >= 1 )
                t = t.substr(t.indexOf(“/”),t.length);
        }
        var ret = [context];
        var done = [];
        var last = null;
        while ( t.length > 0 && last != t ) {