0

I want to use jquery transit and I want it to work reversed. And I mean right to left.

for example:

$('.box').transition({ x: '40px' });

will move the 'box' 40px to right.

but i want it to move to left.

I know that I can pass negative value to that and make it move to left but I can't do that either, because in my situation, the parent has the whole screen width and negative left would move the 'box' out of the screen.

so if i could anyway pass transition x to the element's "right" instead of "left" my problem would be solved.

Taxellool
  • 4,063
  • 4
  • 21
  • 38

1 Answers1

0

have you tried something like this??

$('.box').css('left','+=40px').transition({ x: '-40px' });
Reigel Gallarde
  • 64,198
  • 21
  • 121
  • 139