因为 .hover() 是 jQuery 自己定义的事件… 是为了方便用户绑定调用 mouseenter 和 mouseleave 事件而已,它并非一个真正的事件,所以当然不能当做 .bind() 中的事件参数来调用。

 

    $("body").on("mouseenter","#standard-answer tr",function(){
        var n = $(this).index();
        $("body").find("#student-answer tr").eq(n).css("background","#AFFCF7");    
        });
    $("body").on("mouseleave","#standard-answer tr",function(){
        var n = $(this).index();
        $("body").find("#student-answer tr").eq(n).css("background","");    
        });

 

相关文章:

  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-15
  • 2022-01-26
  • 2021-08-21
  • 2021-10-29
  • 2022-01-14
  • 2022-12-23
相关资源
相似解决方案