Created
October 22, 2010 18:12
-
-
Save robrocker7/641073 to your computer and use it in GitHub Desktop.
Code that was being used is commented out, new code is below
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
$('#home_testimonials a.wpaudio').bind('click', function() {^M | |
if ($(this).hasClass('clicked')) {^M | |
$(this).css('background-image', 'url(<?php bloginfo("template_directory"); ?>/images/icon_listen_home.png)');^M | |
$(this).removeClass('clicked');^M | |
} else {^M | |
$(this).css('background-image', 'url(<?php bloginfo("template_directory"); ?>/images/icon_pause.png)');^M | |
$(this).addClass('clicked');^M | |
}^M | |
});^M | |
^M | |
$('#testimonial_columns a.wpaudio').bind('click', function() {^M | |
if ($(this).hasClass('clicked')) {^M | |
$(this).css('background-image', 'url(<?php bloginfo("template_directory"); ?>/images/icon_listen_testimonials.png)');^M | |
$(this).removeClass('clicked');^M | |
} else {^M | |
$(this).css('background-image', 'url(<?php bloginfo("template_directory"); ?>/images/icon_pause.png)');^M | |
$(this).addClass('clicked');^M | |
}^M | |
});^M | |
^M | |
$('#sidebar_testimonials .listen a.wpaudio').bind('click', function() {^M | |
if ($(this).hasClass('clicked')) {^M | |
$(this).css('background-image', 'url(<?php bloginfo("template_directory"); ?>/images/icon_listen_sidebar.png)');^M | |
$(this).removeClass('clicked');^M | |
} else {^M | |
$(this).css('background-image', 'url(<?php bloginfo("template_directory"); ?>/images/icon_pause.png)');^M | |
$(this).addClass('clicked');^M | |
}^M | |
});^M | |
^M | |
$('#testimonial_list .testimonial .listen').bind('click', function() {^M | |
if ($(this).hasClass('clicked')) {^M | |
$(this).css('background-image', 'url(<?php bloginfo("template_directory"); ?>/images/icon_listen_testimonials.png)');^M | |
$(this).removeClass('clicked');^M | |
} else {^M | |
$(this).css('background-image', 'url(<?php bloginfo("template_directory"); ?>/images/icon_pause.png)');^M | |
$(this).addClass('clicked');^M | |
}^M | |
});^M | |
*/ | |
$('.wpaudio').click(function() { | |
current_image = $(this).css('background-image'); | |
$('.wpaudio').css('background-image', 'url(<?php bloginfo("template_directory"); ?>/images/icon_listen_testimonials.png)'); | |
if(current_image.match(/icon_pause/)){ | |
$(this).css('background-image', 'url(<?php bloginfo("template_directory"); ?>/images/icon_listen_testimonials.png)'); | |
} else { | |
$(this).css('background-image', 'url(<?php bloginfo("template_directory"); ?>/images/icon_pause.png)'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment