I have a variable that I set up and I want to animate the margin-top to a negative version of that value. I have it set up like so:
var 850_staff_CONTAINER_ht = $('#850_staff_CONTAINER').height();
$("#launcher").click(function() {
$("#850_staff_CONTAINER").animate({
marginTop: '-'850_staff_CONTAINER_ht
}, 300);
$("#profile_850_HEADER").animate({
marginTop: 120
}, 300);
$("#profile_850_BIO").delay(120).animate({
marginTop: 10
}, 450);
$("#profile_850_EDU").delay(220).animate({
marginTop: 10
}, 450);
$("#profile_850_CONTACT").delay(320).animate({
marginTop: 10
}, 450);
});
any help here would be great.
You want to make the variable 850_staff_CONTAINER_ht negative?
First variables can not start with a number. In HTML4, element ids can not start with a number. I put the 850 on the end to make it a valid variable name.
Multiply it