JQuery 通过旋钮调整大小

发布于 2024-07-11 13:20:32 字数 466 浏览 2 评论 0原文

我正在使用 jQuery-ui Resizable - 并且我想使用旋钮而不是边框​​(我的旋钮是右下角的按钮)。

我看到在选项中我有一个 KnobHandles,我必须将其设置为 true

我在哪里设置手柄? 我尝试在手柄选项中设置它,但它不起作用。

下面是我的代码:

window.resizable({
    'handles':'handler-resize',
    'knobHandles': true
});

更新:刚刚注意到旋钮手柄是一些默认的东西。 我想用自定义按钮调整它的大小,有什么办法吗?

I am using jQuery-ui Resizable - and i want to use a knob instead of the borders (my knob is a button in the bottom right).

I see that in options I have a KnobHandles, that I have to set to true.

Where do I set my handle? I tried to set it in the handles option but it is not working.

Below is my code:

window.resizable({
    'handles':'handler-resize',
    'knobHandles': true
});

UPDATE: just noticed that the knobhandles is some default stuff. I want to resize it with a customized button, is there a way?

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

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

发布评论

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

评论(2

将军与妓 2024-07-18 13:20:32

我做到了,我只需要设计旋钮的样式...

顺便说一句:手柄必须带有 s、n、se 等方向...

i did it, i just had to style the knobs...

btw: handles must come with direction like s, n, se, ...

梅倚清风 2024-07-18 13:20:32

每个句柄字符串(如果指定)应采用 jQuery 选择器的形式,与用作句柄的可调整大小的子元素相匹配。

所以我想你想要这样的东西:

'handles': '.handler-size'

Each handle string (if specified) should be in the form of a jQuery selector matching the child element of the resizable to use as the handle.

So I think you want something like:

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