Currently I am in the process of removing jQuery from an older website. However, I have encountered a problem with an animation that is currently being used.
I have managed to replicate the opacity fade effect, but I am struggling to smoothly transition the visibility property. It seems to either go directly from 1 to 0 without any smooth transition. How can I achieve both effects smoothly?
$("#square").css({ opacity: 0.0, visibility: "visible" }).animate({ opacity: 1.0 }, 200);
$("#square").css({ opacity: 1.0, visibility: "hidden" }).animate({ opacity: 0.0 }, 200);