var pop = Popcorn("#demo", {
defaults: {
footnote: {
target: "demo-notes"
}
}
}),
playbackData = [
{
start: 7,
end: 11,
text: "Jack and Jill sign in"
},
{
start: 11,
end: 14,
text: "Spectators can see both sides"
},
{
start: 14,
end: 18,
text: "Once you choose a color, you can only see your side."
},
{
start: 18,
end: 24,
text: "How are we going to play an entire game of chess? There's only 20 seconds left in this demo!"
},
{
start: 24,
end: 30,
text: "A piece moved to an illegal square just floats back to its starting square (<a href='http://jqueryui.com/'>jQuery UI</a> drag+drop)"
},
{
start: 31,
end: 38,
text: "Whenever a move is made, the current player's box flashes (<a href='http://www.w3.org/TR/css3-animations/'>CSS3 keyframe animation</a>)"
},
{
start: 38,
end: 46,
text: "I have no way of knowing where my opponent's pieces are!"
},
{
start: 42,
end: 46,
text: "*"
},
{
start: 42,
end: 46,
text: "*There are actually a few ways to cheat. Shhh.",
target: "small-notes"
},
{
start: 46,
end: 53,
text: "Moves are validated on the client, then reported to the server and broadcasted to other clients via <a href='http://socket.io/'>socket.io</a>."
},
{
start: 54,
text: "Fool's mate. The client has callbacks for check and mate, and announces the winner/loser."
}
];
// Load in all footnotes
$.each( playbackData, function( i, data ) {
pop.footnote( data );
});
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.