On Tue, Dec 8, 2009 at 2:27 PM, hosemaria <[email protected]> wrote:

> Hi
> Few questions.
> 1. How to force resizable to resize only with one dimension x or y?
>

Two options
1. only enable certain handles:

http://docs.jquery.com/UI/Resizable#option-handles

2. Set min and max width or min and max height to current width or height:

http://docs.jquery.com/UI/Resizable#option-maxHeight
http://docs.jquery.com/UI/Resizable#option-maxWidth
http://docs.jquery.com/UI/Resizable#option-minHeight
http://docs.jquery.com/UI/Resizable#option-minWidth


> 2. Is it possible to bound resizing by element that is contained by
> resizable. Ex
> <div id="main">
>    <div id="inner" style="{width:30}"></div>
> </div>
> #main is resizable, and I want to stop resizing when border meets
> borders of #innner.
>

Not by specifying the element. The containment option (
http://docs.jquery.com/UI/Resizable#option-containment ) only works for
parents/max, not children/min. But you could set the min width and min
height based on that element's width and height. See links above.

- Richard

--

You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en.


Reply via email to