JQuery Dialog with constant aspect ratio

Posted by David Semeria on Stack Overflow See other posts from Stack Overflow or by David Semeria
Published on 2010-06-16T21:18:26Z Indexed on 2010/06/16 21:22 UTC
Read the original article Hit count: 171

Filed under:
|
|

I need to display an image in a resizable dialog (so far all the specific image popup libraries I have tried do not fit my needs).

All I want to do is maintain the aspect ratio during resizing. Sounds easy, but it's not.

I thought something like this might work, but no dice:

var d = $("").dialog({title:title, width:400, height:400});
d.resizable( "option", "aspectRatio", true );

Any pointers greatly appreciated, tks

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery