Pathik Gandhi Pathik Gandhi - 6 months ago 7
Javascript Question

jQuery - can anybody help me...?

I'm using this code for append some code using jQuery but it won't work.

$('#'+DivId).append($(maincontent).fadeIn('slow'));


but if I use this then it works perfectly

$('#'+DivId).html(maincontent);


Does anybody know what is the problem with
append()
?

Thanks

Answer

use this

$("#your_div").fadeIn('slow');
$('#'+DivId).append(maincontent);