I am appending DOM to some element in an interval, I want it to fade in, but it seems that it first apears, then disappears, and only then fade in is run.
var el = document.getElementById('cont');
el.innerHTML = '';
var toAppend = getElementsToAppend();
$(el).hide().append(toAppend).fadeIn(300);
How should I do this smoothly?