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 code relies on Modernizr to do element support checks. | |
// Check format browser supports | |
(function format(){ | |
return { | |
ogg: !!Modernizr.video.ogg, | |
webm: !!Modernizr.video.webm, | |
mp4: !!Modernizr.video.h264 | |
} | |
}()); |
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 inp = document.getElementsByTagName('input'), len = inp.length; | |
while (len--) { | |
inp[len].value = 'test'; | |
} |
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
/** | |
* A carousel pagination built with CSS | |
*/ | |
body { | |
background:grey; | |
} | |
.nav { | |
list-style:none; |
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
.face { | |
border:1px solid #ccc; | |
display:block; | |
height:1.3em; | |
text-align:center; | |
width:1.3em; | |
border-radius:.8em | |
} |
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
.prod-listing { | |
list-style:none; | |
margin:0; | |
padding:0; | |
} | |
.prod__item { | |
border:1px solid #000; | |
float:left; | |
text-align:center; |
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 loadScript = function(url, callback) { | |
var d = document, | |
s = d.getElementsByTagName('script')[0], | |
done = false, | |
script = d.createElement("script"); | |
script.type = "text/javascript", | |
script.src = url; | |
script.onload = script.onreadystatechange = function() { | |
if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) { |
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
/*IE8+*/ | |
function findElem(elem, va, arg, str){ | |
var el = document.getElementsByTagName(elem), | |
len = el.length; | |
while (len--) { | |
// document.body["getAttribute"].call(elementToUseInstead, arg1, arg2, arg3) |
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
$ cd /directory | |
$ git clone /path/to/repo | |
$ mv /repo/with/contents/* . | |
$ rmdir /cloned/repo |
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
// Ref: http://www.jordanm.co.uk/post/21863299677/building-with-content-choreography | |
.container { | |
display:box; | |
display:-moz-box; | |
display:-webkit-box; | |
box-orient:vertical; | |
-moz-box-orient:vertical; | |
-webkit-box-orient:vertical; | |
} |
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
/** | |
* Mobile first button abstraction | |
*/ | |
.btn { | |
display: block; | |
text-align: center; | |
text-decoration: none; | |
padding: 1em 0; | |
box-sizing: border-box; |
OlderNewer