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
.centering { | |
position: absolute; | |
margin: auto; | |
top: 0; | |
bottom: 0; | |
left: 0; | |
right: 0; | |
} |
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"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<script data-main="js/app" src="./js/require.js"></script> | |
</head> | |
<body> | |
</body> | |
</html> |
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
require([ | |
"somefile" | |
],function(){ | |
//init function | |
}); |
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
$ary : "a", "b", "c" | |
@for $i from 1 through length($ary) | |
$selecter : "id_"+nth($ary, $i) | |
div.#{$selecter} | |
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
Object.prototype.getId = function(id){ | |
return document.getElementById(id); | |
}; | |
Object.prototype.getTag = function(tag){ | |
return document.getElementsByTagName(tag); | |
}; | |
Object.prototype.addChild=function(tag){ | |
this.appendChild(document.createElement(tag)); | |
return this.childNodes; | |
}; |
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
location.__proto__.getParm = (function(){ | |
if(this.search){ | |
var query = []; | |
var tmpQ = []; | |
query = location.search.replace("?","").split("&"); | |
for(var i=0;i<query.length;i++){ | |
tmpQ[query[i].split("=")[0]] = query[i].split("=")[1]; | |
} | |
return tmpQ ? tmpQ : undefined; |
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
Object.prototype.addEvent=function(type,func){ | |
var tmpFnc = func; | |
eval("var "+type.split(".")[1]+"=tmpFnc"); | |
this.addEventListener(type.split(".")[0], eval(type.split(".")[1]), false); | |
}; | |
Object.prototype.removeEvent=function(type){ | |
this.removeEventListener(type.split(".")[0], eval("this."+type.split(".")[1]), false); | |
}; | |
//target.addEvent("click.name",function(){}); |
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
@import "compass/utilities/sprites"; | |
/*setting*/ | |
//$nav-layout:smart | |
$nav-spacing: 10px | |
/*init*/ | |
@import "nav/*.png" | |
/*usage*/ |
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
require.config({ | |
baseUrl:"js", | |
paths:{} | |
}); | |
require( | |
//import module | |
[ | |
"src/a", | |
"src/b", |
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 = (a>b)? b : c ; |