I am trying to replace the padding of the body when an element is closed using jquery. But, I am having trouble accomplishing this.
My close button works fine, just trying to figure out how to replace the padding.
Here is my JS:
$('#hide').click(function() {
$('#countdown-wrap').slideUp('fast');
$('body').animate({ paddingTop: 45px });
return false;
});
$('body').animate({ paddingTop: 45px });->$('body').animate({ paddingTop: 45 });45pxis not a var in js like it is in css, so you either need to use a normal integer45or a string"45px".