不unbind("click");
怎么解决?
?
??

解决方案 »

  1.   


     //绑定事件
     (function($){
      $.fn.Cy = function(options){
        var defaults = {
      even:"even",
      odd:"odd",
      active:"active",
      click:"click"
    }
    var options = $.extend(options,defaults);
    this.each(function(){
      var tt = $(this);
      $(tt).find("tr:even").addClass(options.even);
      $(tt).find("tr:odd").addClass(options.odd);
      $(tt).find("tr").bind("mouseover",function(){
       $(this).addClass(options.active);
      }).bind("mouseout",function(){
        $(this).removeClass(options.active);
      }).toggle(
    function(){
    $(this).addClass(options.click);
    },
    function(){
    $(this).removeClass(options.click);
    }
      );
      $(tt).find("tr").last().unbind("mouseover").unbind("mouseout").unbind("click");
      $(tt).find("tr").first().unbind("mouseover").unbind("mouseout").unbind("click");
    });
      }
    })(jQuery);现在是TD里有超链接 点击链接无效
      

  2.   

    加个toggle确实麻烦
    复选框又不能选中了.
    算了不要toggle了