I am using jquery-ui-resizable plugin in my project.
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.
--- EDIT ---
One more thing, it should not be re-sizable using right border but should be re-sizable using left border.
You should use the handles
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'
Code examples
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' );
Additional to Ahmed's answer: jQueryUI doesn't include a icon for the sw-handle and also doesn't apply a icon-class for the sw-handle. You may use some CSS to add an icon:
#resizable .ui-resizable-sw{background:url(path/to/custom_icon.gif) no-repeat;}
To do re-sizing from all sides following code can also be used
var resizeOpts = {
handles: "all" ,autoHide:true
};
$( ".selector" ).resizable(resizeOpts);
and autoHide equal true means that grip icon will automatically hide when mouse pointer is taken away from dom object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With