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
<div class="page-wrap"> | |
<section class="main-content"> | |
<h1>Main Content</h1> | |
<p><strong>I'm first in the source order.</strong></p> | |
<p>The key to victory is discipline, and that means a well made bed. You will practice until you can make your bed in your sleep. Fry, we have a crate to deliver. Hey, guess what you're accessories to.</p> | |
<p>I'll get my kit! That's not soon enough! Oh, all right, I am. But if anything happens to me, tell them I died robbing some old man.</p> | |
</section> | |
<nav class="main-nav"> |
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
#text editors | |
*.esproj | |
*.sublime-workspace | |
*.tmlanguage.cache | |
*.tmLanguage.cache | |
*.tmPreferences.cache | |
*.stTheme.cache | |
# project files should be checked into the repository, unless a significant | |
# number of contributors will not be using SublimeText which |
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() { | |
/* == GLOBAL DECLARATIONS == */ | |
TouchMouseEvent = { | |
DOWN: "touchmousedown", | |
UP: "touchmouseup", | |
MOVE: "touchmousemove" | |
} | |
/* == EVENT LISTENERS == */ |
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
var hasTouch = 'ontouchstart' in document.documentElement, | |
touchStart = hasTouch ? 'touchstart': 'mousedown', | |
touchMove = hasTouch ? 'touchmove': 'mousemove', | |
touchEnd = hasTouch ? 'touchend': 'mouseup'; |
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
window.onload = function() { | |
setTimeout(function() { | |
// XHR to request a JS and a CSS | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', 'http://domain.tld/preload.js'); | |
xhr.send(''); | |
xhr = new XMLHttpRequest(); | |
xhr.open('GET', 'http://domain.tld/preload.css'); | |
xhr.send(''); | |
// preload image |
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.getElementById("view_pdf").addEventListener("click", function(evt) { | |
var a = document.createElement('a'); | |
a.setAttribute("href", urlPrefix + cat_directory + filename); | |
a.setAttribute("target", "_blank"); | |
var dispatch = document.createEvent("HTMLEvents"); | |
dispatch.initEvent("click", true, true); | |
a.dispatchEvent(dispatch); | |
}); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<!-- this viewport meta tag configures the mobile device viewport behavior --> | |
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
<!-- this meta tag enables the web site to become a mobile web app (iDevices). See also: navigator.standalone --> | |
<meta name="mobile-web-app-capable" content="yes" /> |
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 checkObjectLength(obj) { | |
var key = 0; | |
for (var i in obj) { | |
if (obj.hasOwnProperty(i)) { | |
key++; | |
} | |
} | |
return key; | |
} |
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
GeoKode: { | |
init: function geoKodeInit(addressString) { | |
!!App.development && console.log('in geoKodeInit'); | |
var self = this, submissionString = addressString.replace(/ /g, '+'), | |
geocoder = new google.maps.Geocoder(); | |
geocoder.geocode({'address': submissionString}, function attemptingToGeoCode(results, status) { | |
if (status == google.maps.GeocoderStatus.OK) { | |
console.log('geocode results: ', results); | |
$.each(results, function(i, result) { |
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 camelCase(method) { | |
return method.replace(/[-_\s]+(.)?/g, function(match, c) { | |
return c ? c.toUpperCase() : ""; | |
}); | |
} |