Skip to content

Instantly share code, notes, and snippets.

@jbutko
Last active August 29, 2015 14:01
Show Gist options
  • Save jbutko/026554e0bdcc77c9dc3e to your computer and use it in GitHub Desktop.
Save jbutko/026554e0bdcc77c9dc3e to your computer and use it in GitHub Desktop.
tumblr, js, jQuery: Responsive spotify player
// 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