I was trying to turn the aspect ratios on/off dynamically in JQueryUI resizable, however even after setting the option to false, it keeps maintaining the aspect ratio. Below is
Another solution is to save resizable options in a variable and destroy and reinitialize the widget with the updated options:
var options = $("#resizable").resizable("options");
if (ischecked) {
options.aspectRatio = .75;
} else {
options.aspectRatio = false;
}
$("#resizable").resizable("destroy");
$("#resizable").resizable(options);