I am using this bit of code to open a div and scroll down to it. It works well, but only the first time I use it, even on page refresh it will not work again. Does anyone know why this is happening? Thanks in advance!
Here is the URL(www.patrickorr.ca)
$(document).ready(function() {
$("div.ftropen")
.click(function(){
$("div#connect").animate({height: "500px" }, "fast");
$("div#ftrconnect").fadeOut("fast"); //hide connectbtn
$("div#ftrhide").fadeIn("fast"); //show hidebtn
$("#connect").scrollTop($("#connect").scrollTop() + 500);
return false;
});
$("div.ftrclose")
.click(function(){
$("div#connect").animate({height: "0px" }, "fast");
$("div#ftrhide").fadeOut("fast"); //hide hidebtn
$("div#ftrconnect").fadeIn("fast"); //show connectbtn
return false;
});
});