problem with animate() and " + "
Hi folks,
I'm trying to consolidate a lot of individual functions which scroll the content of a div. Here's an example:
$('#updown').animate( {marginTop:'-40rem'}, 2000);
I've tried several versions of
function upIt(n,t) {
$("#updown").animate( {"marginTop:" + " 'n' " "rem"}, "t");
}
but get error messages about "+". What am I missing ?
cheers.