jquery – jqGrid禁用行突出显示

前端之家收集整理的这篇文章主要介绍了jquery – jqGrid禁用行突出显示前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当您用鼠标悬停在网格上时,如何以编程方式禁用网格突出显示一行?想要在某些时候禁用它.

这是来自Oleg的代码

$('#result-close').click(function() {  
      //Turn off hover highlighting
      $("#list").unbind('mouSEOver');
      $("#list").unbind('mouSEOut');

      //Highlight row                    
      $("#" + selid).effect("highlight",{},5000);  

      //Turn on hover highlighting 
      setTimeout(function(){ 
                    $("#list").bind('mouSEOver',function(e) {
                        ptr = $(e.target).closest("tr.jqgrow");
                        if($(ptr).attr("class") !== "subgrid") {
                            $(ptr).addClass("ui-state-hover");
                        }
                        return false;
                    }).bind('mouSEOut',function(e) {
                        ptr = $(e.target).closest("tr.jqgrow");
                        $(ptr).removeClass("ui-state-hover");
                        return false;
                    });
      },2000);         

      $('#dialog').dialog( "close" );
  });

解决方法

使用hoverrows:false option.
原文链接:https://www.f2er.com/jquery/176954.html

猜你在找的jQuery相关文章