Fade DIV with cool animation
3 answers
You can also check out jQuery UI as it allows you to animate colors or read this article about plugins for a great user experience.
+3
a source to share
What kind of animation are you looking for? You can slideDown () , slideUp () or use animate () and define your own
+2
a source to share
You can easily do multiple animations in jquery:
/*you can hide your item with the css property first*/
<style>
#id_of_what_want_to_animate{display:none;height:1px;}
</style>
then expand it with jquery
//target the item that triggers the animation
$('#clickthis').click(function() {
//when clicked animate whatever you want, the 5000 is the duration of the animation in
//milliseconds inside the curly braces you can animate css properties
$('#id_of_what_want_to_animate').animate({opacity: 1,height: '200px'},5000,function() {
//run something else when your animation complete.
});
});
you can refer to the detailed jquery documentation at:
0
a source to share