Also, here's a unit test(I think?), if anyone else feels like checking:

http://pioindustries.com/jquery/ratiotest.php

Thanks.

On 1/30/07, Su <[EMAIL PROTECTED]> wrote:

Klaus:

Have you by any chance checked if this works in Safari with an image?
(Flash is fine.) It looks like this is essentially a scripted version of
this CSS trick:

http://www.cssplay.co.uk/layouts/background2.html

...which breaks in Safari. It distorts the image in the direction you
resize the window rather than scaling it proportionally. So I'd been trying
on and off for a little while now to do what you've done here, and failing.
But I just tried your plugin, and the behavior seems the same. I was just
wondering if it was something I was doing.


On 1/30/07, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> 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/
>


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to