jQuery可调整大小的表IE问题

时间:2015-02-04 16:03:22

标签: jquery html internet-explorer

首先,我并没有尝试重新调整表格的大小。我试图重新调整表格的大小。

我在jQuery中发现的是html的放置不正确。在IE或任何浏览器调试器的调试器中看到。

使用此代码。

jQuery的:

$("table").resizable();

HTML:

<table>
    <thead><tr><th></th></tr></thead>
    <tbody><tr><td></td></tr></tbody>
</table>

呈现的html代码(在调试器中看到):

<table class="ui-resizable">
    <thead><tr><th></th></tr></thead>
    <tbody><tr><td></td></tr></tbody>
    <div class="ui-resizable-handle ui-resizable-e" style="z-index: 90;"></div>
    <div class="ui-resizable-handle ui-resizable-s" style="z-index: 90; display: block;"></div>
    <div class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se" style="z-index: 90; display: block;"></div>
</table>

如您所见,div节点直接位于表节点内,这是不正确的html。以下是一个示例:jsfiddle

有谁知道解决方案?

1 个答案:

答案 0 :(得分:1)

这是您在应用程序中使用的脚本文件的问题

添加以下资源

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>

这是一个例子: http://jsfiddle.net/yx1egssj/18/