JQuery fadeIn () not working

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);
});

      

+3


source to share


2 answers


Try to hide it first with the following code:



$('<ol/>', {
  'class': 'raw-list',
  html: items.join('')
})
.hide()
.fadeIn(1000)
.appendTo('.json');

      

+8


source


fadeIn()

will do nothing if the element is already visible.



First you need to hide()

.

+6


source







All Articles