title: zurb foundation 4 reveal modal changing the text in the data-reveal-id="myModal"
body: <p>Hi Sorry if this is a numpty question.<br>
  I'm using reveal and the modal is working fine.<br>
  The text "show info" when clicked is working. How would I set the text up so when clicked it changes to "Hide Info"</p>
  
  <pre><code>function toggle() {
      var ele = document.getElementById("toggleText");
      var text = document.getElementById("myModal");
      if(ele.style.display == "block") {
          ele.style.display = "none";
          text.innerHTML = "show";
      }
      else {
          ele.style.display = "block";
          text.innerHTML = "hide";
      }}
  
  a&gt; id="myModal" href="javascript:toggle();" data-reveal-id="myModal"&gt; show /a
  </code></pre>