Skip to content

Instantly share code, notes, and snippets.

@crongro
crongro / initiate variables
Last active August 29, 2015 14:12
initiate variables
function setVariables(obj) {
var o = {};
for(var myKey in obj) {
o[myKey] = document.querySelector(obj[myKey]);
}
return o;
}
var _v = setVariables({
@crongro
crongro / index.html
Created October 12, 2014 23:55
A Pen by younjisu.
<div id="first"><span>first span</span></div>
<div id="two"></div>
@crongro
crongro / gist:b2a22970a97f8a98acf6
Created September 7, 2014 02:59
javascript Error Handling
<html>
<body>
<div>a</div>
</body>
</html>
<script>
try {
var a;
a.push();
@crongro
crongro / index.html
Last active August 29, 2015 14:03
[setTimeout] mouseover 건너뛰기.
<div id="wrap"></div>
@crongro
crongro / 사용자정의 Global variables 확인 방법
Created June 11, 2014 10:55
사용자정의 Global variables 확인 방법
// 초기 코드에서 이걸 계산.
this.__d = [];
for (i in window) {
this.__d.push(i);
}
//나중에 이 메소드를 실행
(function(win){
@crongro
crongro / index.html
Last active August 29, 2015 14:01
Circle Rolling (infinite ~)
<div id="view">
<div id="content">
<div class="original">
<div class="a">a</div>
<div class="b">b</div>
<div class="c">c</div>
</div>
<div class="addon">
@crongro
crongro / gist:10708235
Created April 15, 2014 06:48
ASM Module performance test
//http://ejohn.org/blog/asmjs-javascript-compile-target/
function DiagModule(stdlib, foreign, heap) {
//"use asm";
// Variable Declarations
var sqrt = stdlib.Math.sqrt;
// Function Declarations
@crongro
crongro / [CSS] :before ,:after example
Last active August 29, 2015 13:58
A Pen by younjisu.
<a href="http://www.naver.com">네이버</ㅁ>
@crongro
crongro / public , private
Created March 27, 2014 06:53
모듈단위로 public/private분리하기.
var obj = (function() {
//private : 한 놈들.(closure 특성을 활용한 private 생성)
var _name = "jisu",
_aData = [],
_innerFun = function(id,name) {
console.log(id , name);
};
function Pub(id) {
@crongro
crongro / FpuLn.markdown
Created March 24, 2014 07:59
A Pen by younjisu.