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
// find out if the device is an ios device and add a class. | |
var deviceAgent = navigator.userAgent.toLowerCase(); | |
var agentID = deviceAgent.match(/(iphone|ipod|ipad)/); | |
if (agentID) { | |
$('html').addClass('ios'); | |
} |
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
// this makes checkbox labels clickable on iOS | |
$('label.checkbox').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
// smooth anchor | |
// add a class of scroll to any anchor link and this will smoothly scroll to the location. | |
$(".scroll").click(function(e){ | |
e.preventDefault(); | |
$('html,body').animate({scrollTop:$(this.hash).offset().top}, 500); | |
}); |
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
// form validation | |
$("form").validate({ | |
rules: { | |
// define extra rules | |
}, | |
errorPlacement: function(error, element) { | |
// don't add the error labels | |
return true; | |
} | |
}); |
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
# Enable GZIP | |
<ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
BrowserMatch ^Mozilla/4\.0[678] no-gzip | |
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |
</ifmodule> | |
# Expires Headers - 2678400s = 31 days | |
<ifmodule mod_expires.c> |
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> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
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
// write the current screen width to our screen | |
$("#widget span").html($(window).width()); | |
$(window).resize(function() { | |
$("#widget span").html($(window).width()); | |
}); |
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
// setup our default plans and their pricing options, we only support rounded to the dollar prices | |
var plans = { | |
'standard': { | |
price: 6, | |
term: 10 | |
}, | |
'premium': { | |
price: 10, | |
term: 12 | |
}, |
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
Below is the list of devices that we are currently testing at Pitch. We have found them to be the most popular and giving us over 90% coverage of mobile traffic on our client websites. It's not perfect, check your analytics but this is probably a good place to start. | |
iPhone 3GS (Apple iOS 5) | |
iPhone 4 (Apple iOS 6) | |
iPhone 5 (Apple iOS 6) | |
iPad 1 (Apple iOS 5) | |
iPad 3 (Apple iOS 6) | |
Nexus S (Google Android 4.1) | |
Nexus 7 Tablet (Google Android 4.1) | |
Samsung Galaxy S3 (Google Android 4.0) |
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
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/User/Tomorrow-Night.tmTheme", | |
"find_selected_text": true, | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git" | |
], | |
"font_face": "Source Code Pro", |
OlderNewer