jbutko
5/21/2014 - 6:53 PM

tumblr, js, jQuery: Responsive spotify player

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