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
character counts | |
branching on mobile | |
CSS pseudo classes |
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
// vars to keep track of the "mouse" during touchmove | |
var mouseX; | |
var mouseY; | |
// create the custom events so you can dispatch them later | |
var touchover = new Event("touchover"); | |
var touchout = new Event("touchout"); | |
var touchup = new Event("touchup"); | |
var element = document.getElementById("dropTargetDivName"); |
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
Verifying that +nick is my Bitcoin username. You can send me #bitcoin here: https://onename.io/nick |
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
// variables get initialized up here. That way they're accessible from inside any of the functions below. | |
var playing = false; // nothing is happening until you click | |
var w = 500; // width of mouth frames | |
var l = 0; // keep track of left edge position of mouth sprite image | |
var mouthInterval; // you'll start and stop this below | |
var fps = 1000/30; // the second number is the fps | |
var aud = new Audio("audio/theRightTrack.mp3"); // load the audio before playing it | |
$( document ).ready(function() { // this is just jQuery saying "ready!" and will be in every javascript file you ever make. I put all my events and functions inside it | |
$('.gran').click(function(){ |
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
// ADD THIS FOR ARROW KEY NAVIGATION on the home ticks and the photos on sub pages for maximum power! | |
$(document).bind("keydown", function (e) { | |
switch (e.keyCode) { | |
case 37: // LEFT ARROW | |
// trigger prev tick | |
break; | |
case 39: // RIGHT ARROW | |
// trigger next tick | |
break; | |
} |
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
$(document).keydown(function(e){ | |
if (e.keyCode == 37) { | |
var previous = self.currentX; | |
self.currentX = self.limitXBounds(self.previousPageX(self.currentX)); | |
if (self.currentX !== previous) { | |
self.update(); | |
} | |
return false; | |
}else if (e.keyCode == 39) { | |
var previous = self.currentX; |