中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Jqgrid -- search button doesn't work with Jquery 1.8.0 or greater

發布時間:2020-06-06 02:51:12 來源:網絡 閱讀:685 作者:wander_bird 欄目:web開發

search functionality code:

$("#devicesTable").jqGrid('navGrid', '#pager', {
   del : false,
   add : false,
   edit : false,
   afterRefresh : function() {
       ...
   }

}, {}, {}, {}, {
   multipleSearch : true,
   multipleGroup : true,
   sopt : [ 'cn', 'eq' ]
});


I struggled with the same issue, and after I while I found the reason that jQgrid search does not work with jQuery 1.8.3:

In my jquery.jqGrid.js (v 4.3.3) i found this:

if($("#"+ $.jgrid.jqID(IDs.themodal)).html()!==null){

   showFilter($("#fbox_"+ $.jgrid.jqID(+$t.p.id)));

}

In jquery.jqGrid.min.js as follows:

if(null!==a("#"+a.jgrid.jqID(t.themodal)).html())d(a("#fbox_"+a.jgrid.jqID(+e.p.id)));


In my file it was on line 6863, but you may have to search for it, since my file may be a bit modified compared to the original.

The problem is that $([id]).html() evaluates to null in older jQuery versions, while in jQuery 1.8.0 it instead evaluates to undefined! Since (undefined !== null) is true and (null !== null) is false, the code does different things with different versions of jQuery.

What I did to fix it, and make it work with jQuery 1.8.0 was to change the comparator from !== to !=. This works since both (null != null) and (null != undefined) evaluates to true!

Hope this could be of help!


link to http://stackoverflow.com/questions/12199400/jqgrid-search-button-does-nothing


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

中山市| 江永县| 封开县| 葫芦岛市| 汽车| 道真| 湖北省| 乌拉特后旗| 乌拉特中旗| 阿拉善右旗| 桃园县| 谷城县| 岑巩县| 北京市| 昌图县| 松阳县| 石首市| 临颍县| 钦州市| 阳山县| 桃江县| 桐柏县| 商城县| 大余县| 霍邱县| 沧州市| 东乌珠穆沁旗| 周口市| 巴林左旗| 漠河县| 湄潭县| 中山市| 二连浩特市| 普兰县| 永安市| 鲁甸县| 石家庄市| 成安县| 广元市| 河西区| 赣榆县|