Question

I am trying to apply show('slow') with .append() but doesn't seem to work at all. Here is my code:

var listing = "html data";

$('#sectionArticles').append(listing);

I found we can only use show('slow') with appendTo, is that true? How to apply smooth loading in this.

Was it helpful?

Solution

wrxsti's solution works well, but an alternative could be to use fadeIn(), see link below:

DEMO

OTHER TIPS

Should work just fine. I have included an example.

http://jsfiddle.net/wrxsti85/RZjAu/

Javascript:

var listing = "<p>blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah </p>";

$('#sectionArticles').append(listing).show('slow');

HTML:

<div id="sectionArticles"></div>

CSS:

#sectionArticles {
    display:none;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top