zeshan-a
10/23/2015 - 8:17 PM

Pause all audio players except the clicked one.

Pause all audio players except the clicked one.

// 
// Pause all audio players except the clicked one.
// Script by Zeshan Ahmed (http://www.zeshanahmed.com/)
// 

jQuery(document).ready(function($) {
  $('.mejs-playpause-button button').click(function() {
    $('audio').not( $(this).closest('audio') ).each(function(){
      this.pause();
      this.currentTime = 0;
    });
  });
});