Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html>
<head>
<script src="http://popcornjs.org/code/dist/popcorn-complete.min.js"></script>
<script>
// ensure the web page (DOM) has loaded
document.addEventListener("DOMContentLoaded", function () {
// Create a popcorn instance by calling Popcorn("#id-of-my-video")
var pop = Popcorn("#ourvideo");
@brettgaylor
brettgaylor / Popcorn101
Created June 17, 2011 19:35
Popcorn 101
<!doctype html>
<html>
<head>
<script src="http://popcornjs.org/code/dist/popcorn-complete.min.js"></script>
<script>
// ensure the web page (DOM) has loaded
document.addEventListener("DOMContentLoaded", function () {
// Create a popcorn instance by calling Popcorn("#id-of-my-video")
var pop = Popcorn("#ourvideo");
@brettgaylor
brettgaylor / Popcorn101
Created June 16, 2011 17:48
Popcorn 101
<!doctype html>
<html>
<head>
<span id="popcorn-js"><script src="http://popcornjs.org/code/dist/popcorn-complete.min.js"></script></span>
<script>
<span id="eventlistener">// ensure the web page (DOM) has loaded
document.addEventListener("DOMContentLoaded", function () {</span>
<span id="popcorninstance">// Create a popcporn instance by calling Popcorn("#id-of-my-video")
var pop = Popcorn("#ourvideo");</span>