title: how to pause all playing audios on a page
body: <p>I've got a html5 player which works like this : </p>
  
  <p>Html : </p>
  
  <pre><code>&lt;div class="player row" data-dwplayer="true" data-mp3="example.mp3" data-loop="true"&gt;
  </code></pre>
  
  <p>Javascript : </p>
  
  <pre><code>$("[data-dwplayer=true]").each(function(){
      var player = $(this);
      var audio = new Audio();
  
      /* data */
      var source = player.data('mp3') ? player.data('mp3') : player.data('ogg');
      var auto   = player.data('autoplay') ? true : false;
      var loop   = player.data('loop') ? true : false;
  
      /* set source */
      audio.src = source;
  
  and the rest of code ... 
  </code></pre>
  
  <p>meaning all audio players are made with javascript and there is no actual <code>&lt;audio&gt;</code> tag on the page , what i want to do is , I need to write a function which , when some one clicks the play button for an audio player, All other audio players should pause , I've tried this code but it ain't working i think it's because there is no actual <code>&lt;audio&gt;</code> tag</p>
  
  <pre><code>/* stop other audio players */
  $("audio").not(audio).each(function() {
      if( this.readyState != 0 ) {
          this.pause();
          this.currentTime = 0;
      }
  });
  
  /* play current audio player */
  if( audio.paused &amp;&amp; audio.readyState != 0 )
      audio.play();
  </code></pre>
  
  <p>What should i do</p>