I have issue for pop-up the footer with jquery. My code is work but the only problem is it doesn't work with the first click on the button, it work by second clicking on the button? any idea? Here is my code:
<script type="text/javascript">
jQuery(function($) {
var open = false;
$('#footerSlideButton').click(function () {
if(open === false) {
$('#footerSlideContainer').animate({ height: '0' });
$(this).css('backgroundPosition', 'top left');
open = true;
} else {
$('#footerSlideContainer').animate({ height: '150px' });
$(this).css('backgroundPosition', 'bottom left');
open = false;
}
});
});
</script>