title: Reset Audio when I click on a link
body: <p>When I play an audio, pause the audio, click on the external link, then go back to the page where the audio is located, I want the audio to reset instead of leaving where I left off, but it leaves where I left off.</p>
  
  <p>In my HTML5 page, I included this link before the closing body tag:
     src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js">         </p>
  
  <p>HTML5:</p>
  
  <pre><code>&lt;table id="multiplemp3"&gt;
      &lt;tr&gt;
         &lt;th&gt;
          &lt;audio controls&gt;
              &lt;source src="http://geo-samples.beatport.com/lofi/5005876.LOFI.mp3" type="audio/mpeg"&gt;
  Your browser does not support the audio element.
              &lt;/audio&gt;
      &lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
      &lt;th&gt;
          &lt;audio controls&gt;
              &lt;source src="http://geo-samples.beatport.com/lofi/5005933.LOFI.mp3" type="audio/mpeg"&gt;
  Your browser does not support the audio element.
          &lt;/audio&gt;
      &lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;br&gt;
  
  
  &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Main_Page"&gt;More . . .&lt;/a&gt;&lt;/p&gt;
  &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Main_Page"&gt;Return to Home Page&lt;/a&gt;&lt;/p&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>/* allows user to play one mp3 at a time */
  
  /* declare variables: get tag from html */
  var audios = document.getElementsByTagName("audio");
  
  var links = document.getElementsByTagName("a");
  
  /* bind() is used for binding audio attribute and parameters of a function call, audio is the current audio element played( comes from the binding above), we compare each element in audios with this, and pause all those which are not matching. */
  
  for (var i=0; i&lt;audios.length;i++)  {
    audios[i].onplay = pauseAllAudios.bind(null, audios[i]); 
  }
  
  function pauseAllAudios(audio) {
      for(var i=0; i&lt;audios.length;i++)
         if(audios[i]!=audio)  {
           audios[i].pause();    
         } else if (links.click() ) {
              audios[i].stop();    
        }
  };
  </code></pre>
  
  <p><a href="http://jsfiddle.net/0eun4kcy/1/" rel="nofollow">http://jsfiddle.net/0eun4kcy/1/</a></p>