I am working on a comment system where each comment includes a button that usually shows the number of replies it has. I am looking to create an effect where, when a user hovers over the button, the text changes from "3 replies" to "Reply!", and then reverts back to "3 replies" when the mouse leaves the button.
Given that the number of replies is different for each comment, I cannot use a basic mouseover/mouseout script. One approach could be to pass the number of replies as a variable and create a function to handle the change. However, I am hoping there might be a simpler solution. I have tried using the :hover pseudo-class in CSS to modify the content of the element (using the 'content' property), but so far no success.
I would appreciate any assistance you can provide. Thank you!