I have a function and it works when you click close: it slides up. However, I want it to slide down by default when you first go to the page. It is just appearing right now, not sliding down.
$(document).ready(function () {
$("#related2").slideDown();
$(".close2").click(function (event) {
event.preventDefault();
$("#related2").slideUp();
});
});
Your code should work as long as you have the style of the #related element set to
display:none. That way it can animate the showing of the element when it hits your ready() code.