Skip to content

Instantly share code, notes, and snippets.

@cscotta
Forked from anonymous/gist:4190442
Created Dec 2, 2012
Embed
What would you like to do?
for (var i = 0; i < 6; i++) {
var name = 'ep' + i + '_player';
document.getElementById('episode' + i).addEventListener('click', function(evt) {
showEpisode(name); evt.stopPropagation();
});
name = 'ep' + i + '_preview_player'
document.getElementById('episode' + i + '_preview').addEventListener('click', function(evt) {
showEpisode(name); evt.stopPropagation();
});
}
document.getElementById('episode2_outtakes').addEventListener('click',function(evt) {
showEpisode('ep2_outtakes_player'); evt.stopPropagation();
});
document.getElementById('episode3_outtakes').addEventListener('click',function(evt) {
showEpisode('ep3_outtakes_player'); evt.stopPropagation();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment