December 3, 2010
jQuery resizable plugin, to resize only height
Question by Goppie TOp
How to make alsoResize option to only work for height but not for both width and height?
Answer by Starx
Actually if you set maxWidth to a limit, we cannot resize the width more than it.
For example,
$( ".selector" ).resizable({ maxWidth: 250 }); //For initialzation
will not allow the resize to occur more that 250px in width
If you check this demo
http://jqueryui.com/demos/resizable/#max-min, you will notice the width resizing being limited to a point.
So in your case set the initial width of the .selector and maxWidth same and it is done.
For further information go to http://jqueryui.com/demos/resizable/#option-maxWidth