Skip to content

Instantly share code, notes, and snippets.

@manikrathee
Created October 15, 2012 02:55
Show Gist options
  • Save manikrathee/3890623 to your computer and use it in GitHub Desktop.
Save manikrathee/3890623 to your computer and use it in GitHub Desktop.
click, This
// Now Playing & Background Album Art
$('#main-stream').on('click', '.stream-item', function(){
var artist = $('this').find('.artist').text();
var track = $('this').find('.track').text();
var nowPlaying = arist + track;
$('#now-playing-title').text(nowPlaying);
if ($('#now-playing').hasClass('hidden')){
$('#now-playing').removeClass('hidden')
}
// albumArt = $('this').data('album-art-background');
// if ($('body').hasClass('active')){
// $('body').addClass('tracked').css('background-image','url("' + albumArt + '")');
// }
});
// Set ACTIONS to active/inactive on Click
$('#main-stream').on('click', '.track-action-item', function(e){
e.preventDefault();
e.stopPropagation();
$('this').toggleClass('active');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment