I am setting up a CSS effect in JavaScript (filter property) and in the next line I am setting up that property to none. My image has filter equal to none, but I want to make it with transition.
Without the last line (when I’m setting the property back to none) if I disable the filter property in the console it works with transition.
loadImg.style.filter = `blur(${value})`;
loadImg.style.transition = `-webkit-filter ${transitionDuration} ${timing} ${delay}`;
loadImg.style.filter = 'none';
I know it’s because of JavaScript, but I have no idea how to make it work with transition.