Solution for button that hides/unhides text box

I’m trying to create a ‘translate now’ button for a website that only translates a portion of pre-written text. See screenshot—when the ‘translate now’ button is clicked, the text box on the far right is ‘translated’ into English (not through an API; I have the translated text).

The first solution I thought was to have two overlapping text boxes of the same size, one hidden by default, with simple code that hides/unhides each box when the button is pressed (thanks to giri zano for helping me with that). For some reason, this worked well for about a day, and then it stopped working completely (when the button is clicked, nothing happens now). Also, it’s a bit messy in the Wix editor since the text boxes are overlaid directly on top of each other (we will have several of these text boxes which may need to be changed in the future).

I thought I’d reach out for any other creative solutions the community may have for solving this. I experimented with lightboxes, but, as far as I know, it can’t be anchored to appear directly over any part of the page or attached to a column, so it’s not as elegant.

Any ideas? thanks!

I would store the original text and the translated text in two strings. Just have the 1 text box on screen and when the button is pressed, change the box contents to the translated string rather than the original. No need to hide anything making it easier to work on your layout.