views:

30

answers:

3

I have a application when you click on a div it starts a resizable function on the div, but when I click off of it, or click on another div how can i destroy it? I don't think the stop: function(){} will quite do it because it will destroy it after one resize. Any ideas?

I have an example here: http://www.fissiondesigns.com/simon/

You can click on either box on the image and resize it, but after that I want to be able to destroy the resizable feature if you click on another box, kind of like selectable boxes, but only 1 at a time. Thanks!!

A: 

Set the disabled property to turn off resizable()

$( ".selector" ).resizable( "option", "disabled", true );

Documentation:

http://docs.jquery.com/UI/Resizable

AndrewDotHay
A: 

To remove the resizable feature from an element, use:

$('#my-box').resizable("destroy");

See http://jqueryui.com/demos/resizable/ for the full documentation.

tomit
A: 
$(element).resizable("destroy");