title: 犀利开发—jQuery内核详解与实践-2_jQ解密技术
date: 2018.1.8
选择和操作:选择什么、如何选择、怎么操作、操作什么
学习榜样:css选择器,XPath(很多高级XML应用的基础)
属性、元素、内容、样式、事件、通信
选择、操作、扩展
执行效率、可用性、兼容性、实用性 
var $=jQuery=function(){}
jQuery.fn=jQuery.prototype={
    jquery:"1.3.2",
    siez:funciton(){}
}
// INCLUDE:2.2_.html
jQuery.extend=jQuery.fn.extend=function(obj){
    for(var prop in obj){
        this[prop]=obj[prop]
    }
    return this;
}
;(function(){
    var
        window=this,
        undefined,
        _jQuery=window.jQuery,
        _$=window.$,
        jQuery=window.jQuery=window.$=function(){},
        isSimple=/^.[^:#\[\.,]*$/;
    jQuery.fn=jQuery.prototype={
        init:function () {
        }
    }
})()
23:23
2018.1.9 二 22:16
init:function(selector,context){
    selector=selector||document
    if(selector.nodeType){
    }
    if(typeof selector=='string'){
        //quickExpr=/  /
        var match=quickExpr.exec(selector)
        if(){}else if(){}
        //6
        return this.setArray()
    }
}
jQuery.extend({
    clean:function(element,context,fragment){
    }
})
jQuery.each({
    parent:function(elem){ return elem.parentNode},
    parents:function(elem){return jQuery.dir(elem,"parentNode")},
    next:function(elem){return jQuery.nth(elem,2,"nextSibling")},
    prev:function(elem){return jQuery.nth(elem,2,"previousSibling")},
    nextAll:function(elem){return jQuery.(elem,"nextSibling")},
    prevAll:function(elem){return jQuery.(elem,)},
    sibling:function(elem){return jQuery.(elem,)},
    children:function(elem){return jQuery.sibling(elem.firstChild)},
    contents:function(elem){return jQuery.(elem,)},
},function(name,fn){
    jQuery.fn[name]=function(selector){
        return this.pushStack(jQuery.unique(ret),name,selector)
    }
})
jQuery.dir=funciton(elem,dir){}
jQuery.nth=funciton(elem,dir){}
jQuery.sibling=funciton(elem,dir){}
$(“div.red:nth-child(odd)[title=bar]#wrap p”)
p,div,.red,nth,title,#wrap
1000,jQuery框架的1/4,独立空间,外界无法访问
一个构造器Sizzle;三个核心函数matches,find,filter;一个表达对象selectors
jQuery.find=Sizzle
jQuery.filter=Sizzle.filter
jQuery.expr=Sizzle.selectors
jQuery.expr[“:”]=jQuery.expr.filters
主要两部分:过滤函数-jQuery.filter;过滤表达式对象
id>tag>class 但,实际开发中class频率最高