带有表和列跨度的jQuery UI调整大小 [英] jQuery UI Resize with table and colspans

查看:133
本文介绍了带有表和列跨度的jQuery UI调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要对表实现jQuery UI Resize效果.我的桌子的colspans和宽度等于100%.我无法调整包含天数的表列的大小.没有colspan,一切都很好.我该怎么做才能纠正这种行为?

I need to implement jQuery UI Resize effect to a table. My table has colspans and width equal to 100%. I can't resize my table's columns which contain days. Without colspan everything simply works fine. What can I do to correct this behaviour?

<table style="width: 100%">
    <tr>
        <th colspan="3">Table</th>
    </tr>
    <tr>
        <th>26/12</th>
        <th>27/12</th>
        <th>28/12</th>
    </tr>
    <tr>
        <td>123</td>
        <td>123</td>
        <td>123</td>
    </tr>
</table>

$(function () {
    $('table th').resizable({
        handles: 'e',
        minWidth: 18
    });
});

演示: http://jsfiddle.net/Helid/JvELx/

推荐答案

只需从CSS类中删除table-layout:fixed;:

Just remove table-layout:fixed; from your css class:

table, td, th {
    /*table-layout:fixed;*/
    overflow:hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

实时演示

这篇关于带有表和列跨度的jQuery UI调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆