This file contains hidden or 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
// <a href="product.html" data-lazy-image="product.jpg" data-lazy-image-alt="The Product"></a> | |
;(function($) { | |
$('*[data-lazy-image]').each(function() { | |
var alt = $(this).attr('data-lazy-image-alt') === undefined ? '' : 'alt="'+$(this).attr('data-lazy-image-alt')+'"'; | |
$(this).append($('<img src="'+$(this).attr('data-lazy-image')+'" '+alt+'" />')); | |
}); | |
}(jQuery)); |
This file contains hidden or 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
<a href="#" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=yoursite.com', 'sharer', 'width=626,height=436'); return false;">Share on Facebook</a> | |
<!-- | |
Get a facebook like button: http://developers.facebook.com/docs/reference/plugins/like/ | |
Sign out of facebook to get a snippet with no app id | |
--> |
This file contains hidden or 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
00._global.scss <-- imports vars, mixins & 3rd party libs (grid, etc.) | |
01._typography.scss | |
02._elements.scss | |
02.element.form.scss | |
02.element.form.entry.scss | |
02.element.callout.scss | |
02.element.media.scss | |
03._pages.scss | |
03.page.landing.scss | |
03.page.detail.scss |
This file contains hidden or 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
/* normalize 3.0.3 + h5bp 5.2 */ | |
html {-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}dfn{font-style:italic}mark{background:#ff0;color:#000}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-ap |
This file contains hidden or 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
// Block letter entry on numeric only fields | |
$('.controls').on('keyup','.numeric-only',function() { | |
var alphabet = /[A-z]/g; | |
if (alphabet.test($(this).val())) { | |
$(this).val($(this).val().replace(alphabet,'')); | |
} | |
}); |
This file contains hidden or 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 _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); | |
_gaq.push(['_trackPageview']); | |
(function() { | |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | |
})(); | |
This file contains hidden or 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 item = items[Math.floor(Math.random()*items.length)]; |
This file contains hidden or 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
<script language="javascript"> | |
// set viewport to zoom to 1200px wide on viewports > 640px wide | |
var viewPortTag = document.createElement('meta'); | |
viewPortTag.id = 'viewport'; | |
viewPortTag.name = 'viewport'; | |
if (screen.width > 640) { | |
viewPortTag.content = 'width=1200'; | |
} else { | |
viewPortTag.content = 'width=device-width'; | |
} |
This file contains hidden or 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 lang="en-US"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Default Page Title</title> | |
<link rel="shortcut icon" href="favicon.ico"> | |
<link rel="icon" href="favicon.ico"> | |
<link rel="stylesheet" type="text/css" href="styles.css"> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> | |
<!--[if lt IE 9]> |
This file contains hidden or 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
#thing-with-transparent-png-bgr { | |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF, endColorstr=#00FFFFFF); | |
} | |
/* via http://www.jacklmoore.com/notes/ie-transparency-problems */ |