Created
May 10, 2012 16:15
-
-
Save douglasback/2654215 to your computer and use it in GitHub Desktop.
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
jQuery(document).ready(function(){ | |
$('.close-reveal-modal').on("click", function(e){ | |
e.preventDefault(); | |
for (var i=0; i<window.player.length; i++){ | |
window.player[i].pauseVideo(); | |
} | |
}); | |
}); |
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
function onYouTubePlayerAPIReady(){ | |
var videos = jQuery('.youtube-player'), | |
l = videos.length; | |
window.players = []; | |
for (var i=0; i < l; i++){ | |
window.players.push(new YT.Player(videos[i].id, { | |
events: { | |
} | |
})); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment