title: Toggling button text in jquery
body: <p>I have an HTML button created and I want to toggle the text that is displayed in the button between two text using Javascript/JQuery. How do I do this?</p>
  
  <p>Currently, I have:</p>
  
  <pre><code>&lt;button onclick="showAll();" class="collapse-classes"&gt;
      &lt;span class="button-text"&gt;Show&lt;/span&gt;
  &lt;/button&gt;
  </code></pre>
  
  <p>The button starts off by displaying "Show" and then switch to "Hide" when clicked and then switch to "Show"  when clicked again and onward. I tried changing the value of the tag but it doesn't change the text displayed. Can anyone help with the script? thanks</p>