views:

364

answers:

2

I am trying to use the jQuery UI Resizable feature. I would like to only add a south/west resize handler on one object, so it will resize to the west and south. When it resizes, I would like to simultaneously resize another object, but only in the 'south' direction. I am trying to use the alsoresize property, but it seems always resizes the second object by the same amount in both directions. Does any one know how to achieve this?

Thank you,

Eric

+1  A: 

Try this fellow Eric! There might be some issues with margin/padding.

$('.main').resizable({
    resize: function(event, ui)
    {
     $('.also').css("width",ui.size.width+"px");
    }
});
Eric
A: 

Thanks Eric. Your solution works. I actually also come up with a workaround by warpping the 'alsoresize' element in a transparent div (so it will resize in both ways) and have a fixed width on the actual element. This will use the broswer's css support to achieve the same results.

Eric

Eric