Reputation: 10071
I am trying to add an animation effect to changing contents of a selected element.
Like here's my code to change contents of a div..
$('.message').html('The product has been deleted.');
I want to add a simple slide down effect to this process. How should I do this?
Upvotes: 0
Views: 648
Reputation: 1428
Just call $('.message').html('The product has been deleted.').hide().slideDown();
(http://api.jquery.com/slideDown/)
Upvotes: 2
Reputation: 65264
$('#check').click(function() {
$('.text').html('Here is my text.').hide().slideDown('slow'); // don't forget to hide it first....
});
Upvotes: 2