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 loadCanvasWithInputFile(){ | |
// canvas | |
var canvas = document.getElementById('myCanvas'); | |
var context = canvas.getContext("2d"); | |
var fileinput = document.getElementById('ab'); // input file | |
var img = new Image(); | |
fileinput.onchange = function(evt) { | |
var files = evt.target.files; // FileList object | |
var file = files[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
var fixes = { | |
controlHeight:function(obj){ | |
var elems = obj.find("article"), | |
len = elems.length; | |
for(var i = 0; i < len; i+=2) { | |
var divs = elems.slice(i, i+2), | |
height = Math.max(divs.eq(0).height(), divs.eq(1).height()); | |
divs.css('min-height', height); | |
} | |
} |
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
// http://dailyjs.com/2010/06/03/framework-part-15/ | |
function animate() { | |
var box = document.getElementById('box'), | |
duration = 1000, | |
start = (new Date()).valueOf(), | |
finish = start + duration, | |
interval; |
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
input[type=radio] { | |
position: absolute; | |
height: 26px; | |
width: 26px; | |
opacity: 0; | |
filter: alpha(opacity = 100); | |
cursor:pointer; | |
} | |
input[type=radio] + label { |
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
/* | |
http://thecssninja.com/talks/ridiculous_checkboxes/#/ | |
*/ | |
/* Off */ | |
input[type="checkbox"] ~ div { | |
// Fancy styles | |
} | |
/* On */ |
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
/* iPhone 5 ----------- */ | |
@media only screen and (min-device-width : 320px) and (max-device-width : 568px) { | |
/* Styles */ | |
} |
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
body {font-size: 62.5%; font-family:"Verdana",sans-serif; } | |
fieldset { border:0; } | |
label,select,.ui-select-menu { float: left; margin-right: 10px; } | |
select { width: 200px; } | |
.wrap span.ui-selectmenu-item-header, | |
.wrap ul.ui-selectmenu-menu li a { text-decoration: underline !important; } | |
.ui-selectmenu-menu li a, .ui-selectmenu-status { padding:.405em 2.1em 0.405em 1em; } | |
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br, .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { border-radius: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
/* | |
* http://stackoverflow.com/questions/6534473/how-can-i-make-the-width-of-my-figcaption-match-the-width-of-the-img-inside | |
*/ | |
figure { display: table; } | |
figcaption { display: table-caption; caption-side: bottom ; } |
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
// http://css-tricks.com/on-target/ | |
$("a[href^=#]").on("click", function(e) { | |
e.preventDefault(); | |
history.pushState({}, "", this.href); | |
}); |
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
.loc { | |
display:table; | |
position:relative; | |
margin-bottom:39px; | |
} | |
.faldon { | |
display:table-caption; | |
position:absolute; | |
bottom:0; | |
left:0; |
OlderNewer