I'm using JQUERY animate to show a ban开发者_运维技巧ner at the top of the page, which is a DIV that is set to top -60 to hide it. I'm using the following JS call to show the div:
// Animation
$('#message-dock').animate({
top: 0
}, 500, function() {
// Animation complete.
});
What I can't figure out is for some reason there is an unwanted delay before I start seeing the div and I can't figure out why? Any Ideas?
Why not just set the css of the div to display:none;
and then use $("#message-dock").show('slow');
when you want to show it? Works without 'slow', or with 'fast' too.
精彩评论