title: Toggling the play/pause button for audio player using jquery
body: <p>I am trying to make an audio player using jquery and seem to have some problem doing so. I can stop the music but i can't seem to play it back again.</p>
  
  <p>HTML:</p>
  
  <pre><code> &lt;footer&gt;
          &lt;nav&gt;
              &lt;div id="buttons"&gt;
                  &lt;buttons type="button" id="playbutton"&gt;Stop Music&lt;/button&gt;
              &lt;/div&gt;
          &lt;/nav&gt;
    &lt;/footer&gt;
    &lt;audio id="Theme" autoplay&gt;
        &lt;source src="BillaTheme.mp3"/&gt;
    &lt;/audio&gt;
  </code></pre>
  
  <p>Jquery:</p>
  
  <pre><code>$("document").ready(function(){                    
          $("#playbutton").click(function() {
                      if (!$("#Theme").paused)
                      {
                          $("#Theme")[0].pause();           
                          $("#playbutton").text("Play Music");
                      }
                      else
                          {
                              $("#Theme")[0].play();           
                              $("#playbutton").text("Stop Music");
                          }
                  });
  });
  </code></pre>
  
  <p>Not sure where the error is.. Need some guidance...</p>