标签: jquery-ui-resizable

如何仅针对其中一列重新调整鼠标拖动事件中两个表的列?

我有两个表,其中包含id sample1和sample2.sample1包含<th class="header">和sample2包含<td class="desc">.我想要做的就是当我<th>在sample1中调整大小时,它也应该<td>在同一个同步中自动调整sample2中的大小.我正在使用jQuery resizeable()方法,但我没有得到它.

请帮忙.

这是代码供参考:

<script type="text/javascript" charset="utf-8">
            $(function() {              
                $("#sample1 .header").resizable();
                $("#sample2 .desc").resizable();
            });
        </script>

</head>
<body>
    <div class="center" >



         <table id="sample1" width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <th class="header">header</th><th class="header">header</th>
            </tr>
        </table>
        <table id="sample2" width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td class="desc">cell</td>
                <td class="desc">cell</td>
            </tr>
            <tr>
                <td class="desc">cell</td>
                <td class="desc">cell</td>
            </tr>
            <tr>
                <td class="desc">cell</td>
                <td class="desc">cell</td>
            </tr>                                                                   
        </table>


    </div>  




 </body>
 </html>
Run Code Online (Sandbox Code Playgroud)

html html-table jquery-ui-resizable

1
推荐指数
1
解决办法
6230
查看次数

在DIV中调整SVG的大小,并且不保留宽高比

如何通过jQuery UI在DIV中调整SVG图像的大小?我想调整DIV的大小,并且不保留此DIV中SVG图像的长宽比。

jsFiddle示例

的HTML

   <div style="width: 100px; height:100px; border: 1px solid black;">
      <svg style="width:100%; height:100%; " version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="340.156px" height="340.152px" viewBox="0 0 340.156 340.152" enable-background="new 0 0 340.156 340.152" xml:space="preserve">
          <path fill="#2121ed" fill-opacity="1" stroke="#000000" stroke-width="1" stroke-opacity="0" class="path_vector_1" d="M340.156,170.078c0,93.926-76.146,170.074-170.077,170.074C76.146,340.152,0,264.004,0,170.078
    C0,76.146,76.147,0,170.079,0C264.011,0,340.156,76.146,340.156,170.078z">
          </path>
      </svg>
  </div>
Run Code Online (Sandbox Code Playgroud)

jQuery的

$('div').resizable();
Run Code Online (Sandbox Code Playgroud)

html svg resize jquery-ui-resizable

1
推荐指数
1
解决办法
3122
查看次数

jQuery UI - 使div不可调整大小

我有一个使用jQuery UI调整大小的div.我怎样才能动态地让它不再可调整大小?我试着打电话resizable({ disabled: true })但手柄仍然显示.

javascript jquery-ui-resizable

0
推荐指数
1
解决办法
3745
查看次数

改变div的高度

我有以下脚本,双击,我想改变高度.我将div向下拖动直到200px高度,但是当我双击手柄时,它不会回到0px.

不确定我做错了什么?

http://jsfiddle.net/rYFEY/30/

css jquery jquery-ui jquery-ui-resizable

0
推荐指数
1
解决办法
1238
查看次数

jQuery-UI resizable disabled为true但句柄仍显示

$('.box').resizable({
  disabled: true
});
Run Code Online (Sandbox Code Playgroud)

这是CSS

.ui-resizable-disabled .ui-resizable-handle,
.ui-resizable-autohide .ui-resizable-handle {
  display: none;
}
Run Code Online (Sandbox Code Playgroud)

根据文档,当disabled为true时,.ui-resizable-disabled类将被添加到元素中.在我的情况下,类没有被添加,但调整大小仍然被禁用(意味着我无法通过拖动句柄来调整大小,但是当禁用时,我可以调整大小).当我检查生成的HTML时,style="display:block"被添加到句柄中.我没有隐藏任何节目.

<div class="ui-resizable-handle ui-resizable-e" style="display: block; ">...</div>
Run Code Online (Sandbox Code Playgroud)

我正在使用Google API的jQuery 1.8.我也在应用draggable相同的元素.

javascript jquery-ui jquery-ui-resizable

0
推荐指数
1
解决办法
4458
查看次数