jquery resizable: respect width/height of inner/outer elements to not overflow
Is it possible to resize element with respect to childs/parents? I can easily resize element 开发者_开发问答width to zero, so childs overflow, which is bad (for me). Has jquery some behaviour for this to prevent?
One solution is bind to resize() event, get position/size of inner elements and check if (child.width + child.left < parent.width). But in this case i don't know how to tell jquery to not resize more, only back.
There is also another view from resizing element to his parent, but it could be the same. Check element siblings if one of them overflow parent.
Thank you for any advice.
The minWidth and minHeight options might be used for the children, and the maxWidth and maxHeight options or the containment option - for the parent.
精彩评论