this post i is partially related to
http://www.jeasyui.com/forum/index.php?topic=5361.0I've managed to have a popup window that is contained ito the boundaries of it container.
I need to do the same thing when resizing.
I'd like to stop the resizing when the cursor (mouse) reaches the edge of the container.
the simplest thing should be: to stop the resize action when reached the border. BUT how can I do it? OR there is another way?
w.window('window').resizable({
onResize: function(e){
var d = e.data;
if (d.left < 0){d.left = 0;}
if (d.top < 0){d.top = 0;}
var parent = $(window);
var stop=false;
if (d.left + $(d.target).outerWidth() > parent.width()){
stop =true;
}
if (d.top + $(d.target).outerHeight() > parent.height()){
stop =true;
}
if (stop)
// what to do here??
},
})
thanks, rik