I have a div where I did a $('#div').css('display', 'none');
Now, to bring this item back, I want to fade it in. However, it seems like $('#div').fadeIn()
is not doing it, but I don't want to set display back to block, as if I do it just re-appears instantly instead of fading.. any ideas?
4 years too late but im hoping this will at least help someone out.
You need to first change the CSS class using jquery to visibility:hidden
and then apply the fade in function. You can chain these within the same function or run them seperately. Either way you should see the element just fade back into existance as expected.
Try
$('#div').hide();
instead of
display:none;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With