JQuery plugin to animate overlay
I'm looking for a JQuery plugin to animate the appearance and disappearance of an overlay div. Something like what Rackspace has here:
http://www.rackspacecloud.co开发者_高级运维m/
After staring at the page for 30 seconds or so, a div comes sliding down from the top asking you whether you want to chat with a rep. If you ignore the div for a period of time it slides back up.
I know I could hand code all this using timers and animate() and such, but hoping someone has done it for us already.
Any ideas?
JQuery is very Powerful.
Here's the code:
$(document).ready(function(){
$("#survey").delay(10000).show().animate({top: "300px"}, 2000);
});
Ok Will is correct. animate() is more powerful than I had realized. I was able to get it doing most of what I want with 4 lines of code:
setTimeout(function() {
$j("#survey").show();
$j("#survey").animate({top: "300px"}, 2000);
}, 10000);
JQuery UI is another great thing to have with lots of animation effects. Few like :
$( "#survey" ).toggle( "blind", {},500 );
$( "#survey" ).toggle( "bounce", {},500 );
$( "#survey" ).toggle( "clip", {},500 );
$( "#survey" ).toggle( "drop", {},500 );
For more effects , visit https://jqueryui.com/toggle/
精彩评论