I would like to toggle the class 'hide' to the 'equaliser' div when the play button of an audio post is clicked within my tumblr theme. My HTML is as follows:
<div class="musicplayer">
<div id="playbutton">
{block:AudioPlayer}
{AudioPlayer}{/block:AudioPlayer}</div>
<div class="equalizer hide">
</div>
The issue is that tumblr imports the relevant code for the audio player, so the following script does not run:
$('.playbutton').click(function(){
$(".equalizer").toggleClass("hide");
});
In the source of the page, the HTML of this section is as follows:
<div class="musicplayer">
<div id="playbutton">
<span id="audio_player_151764783410"><div class="audio_player"><iframe class="tumblr_audio_player tumblr_audio_player_151764783410" src="http://myspacethemeology.tumblr.com/post/151764783410/audio_player_iframe/myspacethemeology/tumblr_o6qkb21Z4L1utbsw6?audio_file=http%3A%2F%2Fk003.kiwi6.com%2Fhotlink%2Fdge2vl4ftj%2F04_Into_You.mp3&color=white&simple=1" frameborder="0" allowtransparency="true" scrolling="no" width="207" height="27"></iframe></div></span></div>
<div class="equalizer hide">
</div></div>
The audioplayer is within an iFrame, and the class of the iFrame is different for every single audio post. Is there any script that can trigger an event when the play button is clicked?