Apologies for the double post on this. It already exists in general support as I didnt think it submitted correctly to dev.
Adam. _____ From: AdamJessop [mailto:[email protected]] To: jQuery Development [mailto:[email protected]] Sent: Thu, 05 Mar 2009 09:26:22 +0000 Subject: [jquery-dev] jquery animate to % relative position Hi, I am currently working on a site where we are implementing a fluid layout with the heavy use of percentages so it works over multiple resolutions. As part of the site we wish to animate objects coming onto the screen and ending in a certain position. We have the CSS for the objects final positions with various 'top' values, e.g. the first object has: "top: -25.5%" and we wish to animate that div from below the screen (in our case this can be a start point of: top:0% due to its relativity) and the end animation to have the value shown above. I would have thought that the correct syntax to achieve this result would have been: $('#myDiv').animate({top:'-25.5%'}) However in the case above, the animate function simply makes the result in px, so the objects style ends up with : "top: 25.5px". I actually sent a query to John Resig on twitter about this and recieved a DM reply telling me to try for example: $('#myDiv').animate({top:'-=25%'}) However this just seems to set the resulting style to 0px regardless of the objects start position, percentage or its -=, += notation. Any help or comments would be appreciated. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
