开发者

jquery ui resizable proper use

开发者 https://www.devze.com 2023-01-25 09:30 出处:网络
In my website i use prototype, and in prototype you can pass functions as parameters to some objects, for example, the dragable object.

In my website i use prototype, and in prototype you can pass functions as parameters to some objects, for example, the dragable object.

I have recently stated using jquery resizeable, and i can't quite figure out how exactly to customize it's behavior.

With the default options, i can't do some custom things, like change the grid size dynamicly, or set the containment properties.

To be more specific, i want to be able to make my resizable object stay within the boundaries of a div. the containment option does not work well: it looks like it counts the whole div height, and not just the remainder of the div height from the resizable top.

If someone have an example of advanced resizable customizing to share, it would be great.

here is what i have so far:

jQuery("#div81").resizable(
{ 
    autoHide: true,
           开发者_JAVA技巧     containment: "#container_div",
                handles: 's',

                start: function(event, ui) {
                    },
                resize: function(event, ui) {
                    },
                stop: function(event, ui) {
                    }

            });

thanks for your help,

Tal

0

精彩评论

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