Adarchy
Adarchy

Reputation: 551

jQuery .animate width: 'show'/'hide' from other side

Simple question. I've got some window tools in right-top corner and I want them to show on hover. Pretty simple I've done it with

d.animate({ width: 'show',opacity:0.7},120);

All works good and fine, but it slides from left to right. It would look much more better if it would do it from right to left. Is it possible to simple change it without expanding code?

Upvotes: 2

Views: 1015

Answers (1)

Shmiddty
Shmiddty

Reputation: 13967

http://jsfiddle.net/thHZ9/

If you are positioning the element absolutely, make sure you're positioning it by its right side, not its left:

#cool{
    position:absolute;
    right:10px;
    top:10px;

    ...
}​

Upvotes: 2

Related Questions