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. themesbytype reblogged this from 7th-district
  2. honura reblogged this from bluenaegi
  3. radcodes reblogged this from frickingreferences
  4. molllyyhooper reblogged this from theme-directory-network
  5. theme-directory-network reblogged this from roxiestheme
  6. frickingreferences reblogged this from bluenaegi
  7. porkochops reblogged this from elletricity
  8. bombyliidae reblogged this from elletricity
  9. guavathemes reblogged this from bakaothemes
  10. mawendys reblogged this from elletricity
  11. tips-pikon reblogged this from roxiestheme
  12. roxiestheme reblogged this from bakaothemes
  13. references-resources reblogged this from hellolittlered-org
  14. mugenbaka reblogged this from elletricity
  15. hellolittlered-org reblogged this from bakaothemes
  16. sass-and-sarcasm reblogged this from bakaothemes
  17. natsumekyousukes reblogged this from lycheechansankun
  18. bakaothemes reblogged this from 7th-district
  19. fataltomato reblogged this from strigineserpent
  20. strigineserpent reblogged this from 3dit
  21. 3dit reblogged this from 7th-district
  22. ahikito reblogged this from lannistrecersei
  23. baixxian reblogged this from bluenaegi
  24. aoz0ra reblogged this from bluenaegi