HOW TO CHANGE THE COLOR OF YOUR AUDIO PLAYERS

Please note that you may need additional styling to match your theme. Also, this may not work properly with appended posts (e.g. posts that show up when you enable infinite/endless scrolling)

Look in your theme HTML and look for the audio player embed. It should look like {AudioPlayer}, {AudioPlayerWhite}, {AudioPlayerGrey}, or {AudioPlayerBlack}.

Replace that code with:

<div class="audio_box" id="{PostID}">{AudioPlayerWhite}</div>

Put this code right before </body>:

<script type="text/javascript">
$(function () {
    $(".audio_box").each(function () {
    	var d = $(this).attr("id"),
			e = $(this);
		$.ajax({
			url: "http://" + {Name} + ".tumblr.com/api/read/json?id=" + d,
			dataType: "jsonp",
			timeout: 5E4,
			success: function (d) {
				d = d.posts[0]["audio-player"].replace("FFFFFF", "XXXXXX");
				e.html('<div class="audio_player">' + d + "</div>")
			}
		})
	});
});
</script>

Replace XXXXXX with the hex code of your desired color.

  1. molllyyhooper reblogged this from theme-directory-network
  2. theme-directory-network reblogged this from roxiestheme
  3. frickingreferences reblogged this from bluenaegi
  4. porkochops reblogged this from elletricity
  5. bombyliidae reblogged this from elletricity
  6. guavathemes reblogged this from bakaothemes
  7. mawendys reblogged this from elletricity
  8. tips-pikon reblogged this from roxiestheme
  9. roxiestheme reblogged this from bakaothemes
  10. references-resources reblogged this from thematchgirl
  11. mugenbaka reblogged this from elletricity
  12. thematchgirl reblogged this from bakaothemes
  13. sass-and-sarcasm reblogged this from bakaothemes
  14. kisararagi reblogged this from lycheechan
  15. lycheechan reblogged this from masculinedevil
  16. masculinedevil reblogged this from bakaothemes
  17. bakaothemes reblogged this from 7th-district
  18. fataltomato reblogged this from strigineserpent
  19. strigineserpent reblogged this from 3dit
  20. 3dit reblogged this from 7th-district
  21. ahikito reblogged this from klomaeda
  22. waffuru-o reblogged this from bluenaegi
  23. aoz0ra reblogged this from bluenaegi
  24. bluenaegi reblogged this from thehiddenwill-themes
  25. butt-resources reblogged this from 7th-district