0

这是我使用 GwtQuery 隐藏给定 DIV 的代码:

$("#historySection").hide();

但是,它根本没有隐藏。

这是实际的 HTML div:

    <div id="historySection" class="ui-tabs-panel ui-widget-content ui-corner-bottom pad10">
        <div data-field="history">
        </div>  
    </div>

我的代码有什么问题?

4

2 回答 2

2

当您运行 GQuery 代码时,您确定您的 div 存在于 DOM 中吗?

于 2013-11-09T20:10:15.777 回答
0

我觉得很好。您能否在调用 hide() 方法之后在代码中设置断点?此时,检查 DOM 中 historySection div 的状态。

于 2013-11-09T21:09:14.683 回答