Replace all links to .mp3 with HTML5 audio tag using jQuery

I have a site full of music. When the Yahoo Media Player stopped working I had to figure out how best to convert all these text links to MP3s into playable bits on the page.

I found few things that were helpful, this one specifically. I grabbed the bits I needed, simplified, and came up with this:

I’m real green on jQuery, so i’m sure there are better ways to do this. But this worked for me.

The Matterful Monthly

A monthly for modern meaning makers from Chase Reeves about building lifestyles of significance.

Get the next issue in your inbox:

“I love getting these emails because Chase writes like he talks.” ~ Heath