Updated logic in getting text for div on click of the text button, and removed some troubleshooting code.