Try animating the position at the same time.  Or, position the element based
on the corner that you want to remain fixed.  Exactly how to do it depends
on what other restrictions you have on what you are trying to do.  Put
together a sample page.

On Sat, Jan 9, 2010 at 11:22 AM, Wroathe <reallyto...@gmail.com> wrote:

> Hi there! I was curious if there is a way to set up custom animations
> so that a div will expand from a specified corner to another specified
> corner?
>
> (Ex. If I have a div with a background color of #000 that is 200px by
> 200px and when I hover over it it expands to 500px by 500px from top
> left to bottom right, by default. I want it to expand from top right
> to bottom left or bottom right to top left, etc.)
>
> This is how I have it set up (but it only goes from top left to bottom
> right)
>
> $('div.item').hover(function() {
>    $(this).animate(
>        height: 500px,
>        width: 500px
>    );
> });
>



-- 
John Arrowwood
John (at) Irie (dash) Inc (dot) com
John (at) Arrowwood Photography (dot) com
John (at) Hanlons Razor (dot) com
--
http://www.irie-inc.com/
http://arrowwood.blogspot.com/

Reply via email to