[jQuery] Sliding effect not working
What could be the problem here? I am using the easing plugin to have a
panel slide up out of sight, or down into sight and it was working
before, but now it's not. The panel just quickly goes to the desired
position with no effects. Would other elements on the page affect
this? I am using the latest version of both jQuery and the Easing
plugin. Am I using the animate function incorrectly? Here's the code
I'm using:
function toggleAlert(){
$("#toggle").blur();
$("#alert").animate( {
top: (($("#toggle").html() == "show") ? "-15px" : "-163px")
}, 1000, "easeInOutElastic");
setTimeout(function(t){
$("#toggle").html((($("#toggle").html() == "show") ? "hide" :
"show"));
$("#alert").toggleClass("hide");
$("#alert").toggleClass("show");
}, 500);
return false;
}
$(document).bind("ready", function(r){
$("#toggle").bind("click", function(c){ return toggleAlert(); });
});