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