Skip to content

Instantly share code, notes, and snippets.

@cscotta
Forked from anonymous/gist:4190442
Created December 2, 2012 19:01
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save cscotta/4190456 to your computer and use it in GitHub Desktop.
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