解决方案 »

  1.   

    执行逗号前的代码  返回最后一个逗号后的代码的值
    (alert('a'),1==1);
      

  2.   

    那个代码应该是这个样子的if( 'none' != $('#navicon').css('display') ) { 
     navParent.unbind();
     navParentLink.click(  function () {
                      $(this).siblings('ul').slideToggle() 
              }
         )  
    }
      

  3.   

    这是一种逗号表达式,优先级很低
    逗号表达式会从左往右逐个计算表达式,它的值为最后一个表达式的值。
    也就是说
    e.preventDefault(),
        $(this).addClass('hover'),
        $('.dropdown', this).show()
    这 段代码就是个逗号表达式,有三个表达式要运行,从左到右,逐个运行,其实说白了等同于
    e.preventDefault();
        $(this).addClass('hover');
        $('.dropdown', this).show();