Last active
August 29, 2015 14:01
-
-
Save jbutko/026554e0bdcc77c9dc3e to your computer and use it in GitHub Desktop.
tumblr, js, jQuery: Responsive spotify player
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
// Make Spotify the right size and responsive | |
$(document).ready(function(){ | |
$('.mobile-spotify iframe').css('height', '80px'); | |
$('.mobile-spotify iframe').css('width', '290px'); | |
$('iframe[src*="embed.spotify.com"]').each( function() { | |
$(this).css('width',$(this).parent(1).css('width')); | |
$(this).css('height', '82'); | |
$(this).attr('src',$(this).attr('src')); | |
}); | |
}); | |
// via: https://gist.github.com/towry/7367283 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment