[jQuery] New Plugin: keepRatio
Hi all,
sometimes there may be the need for having Flash movies being 100% wide
while keeping it's ratio. That means they should not only change the
width but also the height on window resize.
Because I needed it, I've created a simple plugin for that:
http://stilbuero.de/jquery/ratio/
Just put in your flash movie and put in the correct values for width and
height, like:
<div id="demo">
<object ... width="300" height="200"> ... </object>
</div>
$('#demo').keepRatio();
http://stilbuero.de/jquery/ratio/
This also works with an image that has a width and a height attribute.
I also wanted the plugin to fix the click-to-activate problem in IE,
thus that's what the container was needed for, but with the simple demo
that doesn't work anymore suddenly (which is why I love IE, because on
Plazes it works fine on a real page I'm working on). I have commented
that out for the time being.
Don't know if it's best name for it, I'm open for better ideas.
Have fun, Klaus
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/