I am doing an Ajax call and on response I would like to hide a div. Right now, I am able to do it successfully, but that is kind of quick. I want some fade out effect on it. How to do it in one single shot?
Here is my current code.
var someDiv = document.getElementById(someId);
someDiv.style.display="none";
Thank you very much in advance!
Nice to see all five answers so far refer to jQuery.
There are several articles for creating a fade effect using vanilla Javascript, though be weary of the Javascript most people publish online.
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