views:

311

answers:

1

I have a div element which is made jquery Resizable. It has alsoResize option set, so other elements resize simultaneously.

What I want to do, is to set size of this Resizable div element programmatically in such way, that all Resizable logic is triggered (especially this alsoResize option is taken into account).

How can I achieve that?

+1  A: 

You can do this:

$(".selector").trigger("resize");

alsoResize internally rigs up a handler to the resize event, so you just need to invoke that :)

Nick Craver
Most obvious solution, I had to be mind-blinded :)
JohnM2