Created
October 15, 2012 02:21
-
-
Save manikrathee/3890508 to your computer and use it in GitHub Desktop.
Boombox - Actions
This file contains 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
// Background Change based on track click | |
$('#main-stream').on('click', '.stream-item', function(){ | |
streamItem = $('this'); | |
albumArt = $('this').data('album-art-background'); | |
console.log( streamItem.data('album-art-background') ); | |
console.log('stream-clicked'); | |
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(); | |
console.log('action-clicked'); | |
$('.track-action-item').toggleClass('active'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment