开发者

How can I make jQuery resizable() prevent overflow?

开发者 https://www.devze.com 2023-02-16 19:50 出处:网络
I have a set of resizable div which can dynamically have content added to them. My problem is that the content inside the div will overflow outside the dimensions of the box.

I have a set of resizable div which can dynamically have content added to them. My problem is that the content inside the div will overflow outside the dimensions of the box.

I do not want to use overflow: auto, but instead always make s开发者_JAVA百科ure that the div is large enough to fit the content inside of it so that it cannot be resized smaller.

Does jQuery provide some simple way of doing this?

The current code is below

$(this).draggable().resizable(
{
  minWidth: 200,
  minHeight: 150,
  maxWidth: 600,
  maxHeight: 450,
});
0

精彩评论

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