Skip to content

Instantly share code, notes, and snippets.

@chasereeves
Created October 6, 2013 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chasereeves/6859822 to your computer and use it in GitHub Desktop.
Save chasereeves/6859822 to your computer and use it in GitHub Desktop.
jQuery('a[href$="mp3"]').each(function(){
var audioURL = jQuery(this).attr('href');
var audioName = jQuery(this).text();
jQuery(this).before('<br/>');
jQuery(this).after('<br/><audio controls src="'+audioURL+'" type="audio/mpeg" preload="none"></audio><br/>');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment