I can\'t figure out to animate marginLeft with jQuery. I need it to subtract 938px every time a user clicks on a link, which was working fine when I was using .css()
There's a syntax error in your code, as you are passing parameters in an object to animate()
you should use :
not ,
to delimit each attribute. Try this:
$("#full-wrapper #full").animate({
marginLeft: '-=938px'
}, 500);
Example fiddle
Replace comman(,) by colon(:).
$("#full-wrapper #full").animate({
marginLeft: "-=938px"
}, 500);
$("#full-wrapper #full").animate({
marginLeft: '-=938px'
}, 500);