在Myjs.js中定义 var Myjs = {}; Myjs.Find = function(){ }; 然后就可以用Myjs.Find()来调用了...
// Map over jQuery in case of overwrite if ( typeof jQuery != "undefined" ) var _jQuery = jQuery;var jQuery = window.jQuery = function(a,c) { // If the context is global, return a new object if ( window == this || !this.init ) return new jQuery(a,c);
return this.init(a,c); };// Map over the $ in case of overwrite if ( typeof $ != "undefined" ) var _$ = $;
// Map the jQuery namespace to the '$' one window.$ = jQuery; .....
var Myjs = {};
Myjs.Find = function(){
};
然后就可以用Myjs.Find()来调用了...
// Map over jQuery in case of overwrite
if ( typeof jQuery != "undefined" )
var _jQuery = jQuery;var jQuery = window.jQuery = function(a,c) {
// If the context is global, return a new object
if ( window == this || !this.init )
return new jQuery(a,c);
return this.init(a,c);
};// Map over the $ in case of overwrite
if ( typeof $ != "undefined" )
var _$ = $;
// Map the jQuery namespace to the '$' one
window.$ = jQuery;
.....
find:function(){
alert("123")
},
find2:function(){
}
};调用的时候
Myjs.find()
Myjs.find = function(){}
使用的时候new 一个对象出来,就可以使用他的方法了