Jquery Resize Plugin Min Width Depending On Which Edge Is Being Dragged
Possible Duplicate: Jquery resizable plugin, set minWidth depending on the dragging edge How can i set the minWidth and height depending on which edge of the element is being dr
Solution 1:
Kind of a weird interaction, but here it is (jsfiddle)
$(function() {
$( "#resizable" ).resizable({
handles : 'e, n, s, w',
resize : function(event, ui){
switch($(this).data('resizable').axis)
{
case 'n':
$(this).resizable( "option", "minHeight", 75 );
break;
case 's':
$(this).resizable( "option", "minHeight", 100 );
break;
case 'e':
$(this).resizable( "option", "minWidth", 150 );
break;
case 'w':
$(this).resizable( "option", "minWidth", 200 );
break;
}
}
});
});
Post a Comment for "Jquery Resize Plugin Min Width Depending On Which Edge Is Being Dragged"