开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜