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