When was the term directory replaced by folder? It also exemplifies the use of jQuery to change the button text. If you want to make a button onclick, you need to add the onclick event attribute to the element. Using toggle method replace or change the text on same click. And do code to create an HTML page to change the id the! Or more simple without having to name the element (with 'button' element): Thanks for contributing an answer to Stack Overflow! It's reasonable to want to change the text on a ToggleButton when a user clicks on it, so it shows the current state. Any key, closing a window, resizing a window, resizing a window, resizing window. I try to make a click event with jquery. Below is the implementation. Button onClick.