jquery ui可调整大小的左下手柄来调整大小 [英] jquery ui resizable left-bottom handle to resize
问题描述
我在我的项目中使用jquery-ui-resizable插件。
I am using jquery-ui-resizable plugin in my project.
默认情况下,当您创建一个DOM对象jquery-ui-resizable时,可调整大小的句柄将出现在右下角,我需要在左下角有一个可调整大小的手柄。
By default when you make a DOM Object jquery-ui-resizable the resizable handle will appear on right-bottom corner, I need the re-sizable handle on left-bottom corner.
---编辑---
还有一件事,它不应该使用右边框重新调整大小,但应该使用左边框重新调整大小。
One more thing, it should not be re-sizable using right border but should be re-sizable using left border.
推荐答案
您应该使用句柄
supported: { n, e, s, w, ne, se, sw, nw }.
这将在您指定的一侧创建句柄。默认值为
This will create the Handles on the side you specified. Default values are
'e, s, se'
代码示例
使用指定的句柄选项初始化resizable。
Initialize a resizable with the handles option specified.
$( ".selector" ).resizable({ handles: 'n, e, s, w' });
在初始化后获取或设置句柄选项。
Get or set the handles option, after init.
//getter
var handles = $( ".selector" ).resizable( "option", "handles" );
//setter
$( ".selector" ).resizable( "option", "handles", 'n, e, s, w' );
这篇关于jquery ui可调整大小的左下手柄来调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!