摘要:
// 该方法被绑定在jQuery对象上,只能通过$.noConflict()调用 noConflict: function( deep ) { // 取消$在window上的绑定,方法是将_$绑定到window对象上,从而解除其对jQuery的引用 if ( window.$ === jQuery ) { window.$ = _$; } // 如果传入参数deep为ture,说明用户解除window对象的jQuery属性对jQuery对象的引用,执行$同样的操作 if ( deep && window.jQuery === jQuery ) { ... 阅读全文
posted @ 2013-12-01 17:03
charling
阅读(2274)
评论(0)
推荐(0)
摘要:
// extend方法为jQuery对象和init对象的prototype扩展方法// 同时具有独立的扩展普通对象的功能jQuery.extend = jQuery.fn.extend = function() { /* *target被扩展的对象 *length参数的数量 *deep是否深度操作 */ var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, ... 阅读全文
posted @ 2013-12-01 15:55
charling
阅读(7455)
评论(2)
推荐(1)
浙公网安备 33010602011771号