DEV Community

Discussion on: How to make a mouse ripple click effect with CSS, JS and HTML in 2 steps🖱️⚪

Collapse
 
darkain profile image
Vincent Milum Jr

Instead of setting display=none, I think it would be better instead to delete the div when it is no longer in use. Otherwise, you're creating memory leaks on the page which could be disastrous for single-page-application web sites.

Collapse
 
leonardoschmittk profile image
Leonardo Schmitt

I agree with you, soon trying to edit the post. I believe document.body.removeChild(ripple) would solve it...