I have a piece of jQuery code that queries a page via POST and then that page returns some text that gets displayed on the page. This is the code I am using to successfully do this:
$.post(
"query.php?module=vote",
{answer: ans, pid: pid, to: to, page: page},
function(responseText){
$("#poll").html(responseText);
},
"html"
);
I’ve tried changing $("#poll").html(responseText) to $("#poll").html(responseText).fadeIn(1500); but it does not work.
What must I do/change to have the text fade into the page?
In order to fade in, the element must first be faded out. Try fading out instantly (0 seconds) then using a callback function to add the content and fade in.