jQuery 可调整大小:让 ui-ressized-w 表现得像 ui-resizing-e

发布于 2024-10-01 15:43:29 字数 256 浏览 0 评论 0原文

$('#foo').resizable({
   resize:function(){}
});

问题

  1. 这将创建一个东/南手柄,如何创建东/西手柄?
  2. 通过将南类 (ui-ressized-s) 更改为西类 (ui-ressized-w)(当前调试解决方法),西边的行为与东边不同。拖动东边时,元素会展开。当向西拖动时,元素会展开,但也会应用左侧定位。

有什么想法吗?

$('#foo').resizable({
   resize:function(){}
});

Question

  1. This creates a east/south handle, how do you create a east/west?
  2. By changing the south class (ui-resizable-s) to the west class (ui-resizable-w) -current debug workaround-, the west does not behave like the east. When the east is dragged, the element is expanded. When the west is dragged, the element is expanded but a left positioning is also applied.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

少年亿悲伤 2024-10-08 15:43:29

来自手册:

句柄

类型:
字符串、对象默认值:
'e、s、se'

如果指定为字符串,则应为
任何的逗号分隔列表
以下:'n、e、s、w、ne、se、sw、
西北,全部”。必要的手柄将
由插件自动生成。

如果指定为对象,则
支持以下键: { n, e,
s、w、ne、se、sw、nw }。的价值
任何指定的都应该是 jQuery
选择器匹配子元素
可调整大小以用作该句柄。
如果句柄不是
可调整大小,你可以传入
DOMElement 或有效的 jQuery 对象
直接地。代码示例

初始化一个可调整大小的
处理指定的选项。

$( ".selector" ).ressized({ 句柄: 'n, e, s, w' });

From the manual :

handles

Type:
String, Object Default:
'e, s, se'

If specified as a string, should be a
comma-split list of any of the
following: 'n, e, s, w, ne, se, sw,
nw, all'. The necessary handles will
be auto-generated by the plugin.

If specified as an object, the
following keys are supported: { n, e,
s, w, ne, se, sw, nw }. The value of
any specified should be a jQuery
selector matching the child element of
the resizable to use as that handle.
If the handle is not a child of the
resizable, you can pass in the
DOMElement or a valid jQuery object
directly. Code examples

Initialize a resizable with the
handles option specified.

$( ".selector" ).resizable({ handles: 'n, e, s, w' });
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文