tags:

views:

349

answers:

4
A: 

What are you trying to achieve?

It looks to me like...

$('#destination_div').slideDown(500, function() { $('#destination_div').html(msg);});

...will slide the DIV down and then set the HTML. If the DIV is empty then you will see no animation.

what about:

var $destination_div =  $('#destination_div');
$destination_div.html(msg);
$destination_div.slideDown(500);

I'm caching in $destination_div to improve performance, although you could use chaining instead:

$('#destination_div').html(msg).slideDown(500);

You might even want to augment your beforesend method as well:

beforeSend: function() { 
    $("#loader_destination").html(''); 
    $('#destination_div').hide(); 
}
James Wiseman
+2  A: 

You're not setting the HTML until after the Slidedown has taken effect:

$('#destination_div').slideDown(500, function() { 
  $('#destination_div').html(msg);
});

You need to switch that up:

$('#destination_div').html(msg).slideDown(500);
Jonathan Sampson
+1  A: 

Looking at your code I'd say the element is empty for the 500ms it is supposed to be sliding. try:

$('#destination_div').hide().html(msg).slideDown(500);
Allain Lalonde
you saved my life, your snippet fixed my problem, i learned now..i do better next time, thanks to all...
Bharanikumar
Then try accepting the answer
James Wiseman
A: 

my problem fixed , thanks for knowledge share

Bharanikumar
You should select the first correct answer.
Jonathan Sampson