Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
隐藏<;TR>;在IE7中,jQueryUI按钮仍然可见_Jquery_Jquery Ui_Internet Explorer 7 - Fatal编程技术网

隐藏<;TR>;在IE7中,jQueryUI按钮仍然可见

隐藏<;TR>;在IE7中,jQueryUI按钮仍然可见,jquery,jquery-ui,internet-explorer-7,Jquery,Jquery Ui,Internet Explorer 7,这只虫子快把我逼疯了 我正在尝试使用jquery1.4.4过滤大量复杂的表行 这些行包含使用jQuery UI 1.8.5设置样式的元素 此屏幕截图显示了未应用搜索筛选器时行的外观。 这些行通过AJAX post调用动态添加,并在模板化后插入。这是post调用的JS代码 $.post($.url('Asset/GetSites/'), { assetType: assetType, siteType: siteType }, function (data) { //hide the p

这只虫子快把我逼疯了

我正在尝试使用jquery1.4.4过滤大量复杂的表行

这些行包含使用jQuery UI 1.8.5设置样式的
元素

此屏幕截图显示了未应用搜索筛选器时行的外观。

这些行通过AJAX post调用动态添加,并在模板化后插入。这是post调用的JS代码

$.post($.url('Asset/GetSites/'), { assetType: assetType, siteType: siteType }, function (data) {
    //hide the progress spinner
    $('.progSpinner').fadeOut();
    if (data.error) {
        ShowErrorBar();
        return;
    }
    $('#SiteRowTemplate').tmpl(data).appendTo(tbody);
    $('#assetTable input[type=button]').button();

    //tbody.hide().fadeIn();

    //trigger a sort
    $('#assetTable').trigger('update');
    $('#assetTable').trigger('sorton', [[[0, 0]]]);

    $('#pageLbl').text(assetTypeName + ' Assets: ' + siteTypeName);
});
然后,我将使用基本文本输入根据站点和描述列进行过滤。这就是问题所在。以下是代码:

var rows = $('#assetTable tbody tr.assets-site-row');
rows.each(function () {
    var row = $(this);
    var id = row.attr('id');

    if (row.attr('id').toLowerCase().indexOf(val) != -1 ||
    row.children('td').text().toLowerCase().indexOf(val) != -1) {
        //Search is a match
        row.show();
        $('#details' + id).show();
    }
    else {
        //Search is not a match
        row.hide();
        $('#details' + id).hide();
    }
});
在Chrome、IE8和Firefox中,这是正确的。不属于搜索查询一部分的行被正确隐藏,但在IE7中会被破坏。

您可以看到,对于假定要隐藏的行,jqueryui按钮没有正确地从视图中隐藏。如果我打开开发人员工具并在特定的“隐藏”行上关闭和切换内联
diplay:none
样式,那么该行将正确隐藏


这件事基本上让我束手无策。有人有什么建议吗?

我以前遇到过这样的随机问题,比如动态添加的孩子。基本上,我不得不调用
.children().hide()
然后在父对象上调用hide。我所能找到的最好的方法是在IE的DOM中正确映射子元素。

这就是我最终采用的解决方案。