Make HTML hidden by default. If you tell the browser about the disappearance of an element that is already shown, it will not do anything (this is what you are experiencing).
For example, you can wrap result
HTML in a div
tag with a ResponseData
class. Then in CSS you can add this rule:
div.ResponseData { display: none; }
Now, as soon as this data is added to the tweets
area, it will be hidden. Then your fadein
call will work as desired.
Your Javascript will look something like this:
$("#tweets").prepend(result); $("div.ResponseData").fadeIn();
source share