$的定义不应该是 function $(str){...}这样的吗?
jQuery为什么是这种形式.
谁能帮我解释下,下面代码的意思 ? // Map over jQuery in case of overwrite
_jQuery = window.jQuery, // Map over the $ in case of overwrite
_$ = window.$,
       
       // -----------------------  //
jQuery.extend({
noConflict: function( deep ) {
window.$ = _$; if ( deep ) {
window.jQuery = _jQuery;
} return jQuery;
},
        ...

解决方案 »

  1.   

    $是jQuery对象的一个别名你应该忘记黏贴上这句了:window.$ = window.jQuery
      

  2.   

    我在jQuery源码中没有找到这句。
      

  3.   

    var jQuery = window.jQuery = window.$ = function( selector, context ) {
    // The jQuery object is actually just the init constructor 'enhanced'
    return new jQuery.fn.init( selector, context );
    };
    1.2.6 18行.
      

  4.   

    你那是 jQuery 源码  谁能给你解释啊
      

  5.   

    js中方法还是function,在JQuery中可以调用$("xxxx")这是元素的取法
      

  6.   

    LZ贴的是,当前文档中已经有一个$后,jQuery采取的操作。
      

  7.   

    $还不就是一代号,只是我们平时习惯用字母了举个例子
    var $ = function(id){return document.getElementById(id);}