I'm having a problem creating a DOM element, appending it to another element, and having it fade into place.
Obviously, this doesnt seem to work:
$('<div/>').html('hello').appendTo('#parentDiv').fadeIn();
So, what is the proper way?
I'm having a problem creating a DOM element, appending it to another element, and having it fade into place.
Obviously, this doesnt seem to work:
$('<div/>').html('hello').appendTo('#parentDiv').fadeIn();
So, what is the proper way?
Have you tried
$('<div/>').html('hello').appendTo('#parentDiv').hide().fadeIn();
Try:
$("<div>hello</div>").hide().appendTo("#parentDiv").fadeIn();
or alternatively set display none instead of hide().