I am using podPress on my Wordpress instance to give users some playback controls in listening to our podcast episodes. Below, I have the code found on the play button of these controls.
What I'd like to do is write some jQuery that can scrape out the URL of the podcast episode. In this test case, that URL is http://www.test.com/episodes/2012_04_11_episode.mp3. I'd like to write this URL to a variable and then use it elsewhere on my site where I'm building an HTML5 audio player that features our latest episode in a more central location.
Based on the way podPress writes these players, the ID of the link with the URL that I'll need will ALWAYS be "podpress_html5_play_1". I know how to target this ID, but I don't know how to grab a string that is nested within the "onclick" element. Can anyone help?
Here is the code found on the link:
<a id="podpress_html5_play_1" href="javascript:void(null);" onclick="podPressenprintHTML5audio('1', 'http://www.test.com/episodes/2012_04_11_episode.mp3', true);" class="podpress_play_button" title="Play >" style="background-image:url(http://www.test.com/beta/wp-content/plugins/podpress/images/play_button_dyn_v4_32.png);"></a>