Reputation: 1779
I have a simple script but the fadein() part is not working. Not getting any errors though..
$('<ol/>', {
'class': 'raw-list',
html: items.join('')
}).appendTo('.json').fadeIn(1000);
});
Upvotes: 4
Views: 10175
Reputation: 318352
Try to hide it first with the following code :
$('<ol/>', {
'class': 'raw-list',
html: items.join('')
})
.hide()
.fadeIn(1000)
.appendTo('.json');
Upvotes: 10
Reputation: 888223
fadeIn()
won't do anything if the element is already visible.
You need to hide()
it first.
Upvotes: 7