jExt框架
2012-05-14 10:25:08 来源:WEB开发网核心提示: js框架用的多了 就想自己写一个,正好做新项目,jExt框架,所以心血来潮就写了一个,现在的版本已经实现了大多数的常用函数,以及扩展,以链式结构的方式体现
js框架用的多了 就想自己写一个,正好做新项目,所以心血来潮就写了一个,现在的版本已经实现了大多数的常用函数,以及扩展,以链式结构的方式体现。看着又好像是兼容了JQ,
jExt.fn = jExt.prototype = {
_version : "1.0",
init : function(selector,context){
selector = selector || doc;
if(selector.nodeType){
this[0] = this.elem = selector;
this.length = 1;
this.context = selector;
return this;
}
if(typeof selector == "string"){
selector = selector.trim();
var _re = jExt(this._obj(selector) || []);
_re.context = document;
_re.selector = selector;
return _re;
}
}
更多精彩
赞助商链接
