title: How to change toggle text on show hide using javascript
body: <p>Example</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function showme(id) {
          var divid = document.getElementById(id);
          if (divid.style.display == 'block') divid.style.display = 'none';
          else divid.style.display = 'block';
      }
  &lt;/script&gt;
  
  &lt;a onclick="showme('widget');" href="#"&gt;Show Widget&lt;/a&gt;
  
  &lt;div id="widget" style="display:none;"&gt;
  This is a widget
  &lt;/div&gt;
  </code></pre>
  
  <p>I want change text <code>Show Widget</code> &amp; <code>Hide Widget</code>. Let me know</p>
  
  <p>Demo <a href="http://jsfiddle.net/SLcDE/" rel="nofollow">http://jsfiddle.net/SLcDE/</a></p>