Set css property in code (not value, but property)

Set css property in code (not value, but property)

Hello,

I'm want to create animation, where picture is animated from left, right, top and bottom. I'm using absolute position for animation, but I don't know how can I dynamicaly set css property (like left, right, bottom, top); something like this:

  1. var tmp = 'left';
  2. $('ul.grid li').eq(2).find('img.flag').animate(tmp, '0');
Can you help me please?
Thank you and have a nice day!

Sebastian