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
/* | |
* It returns previous element sibling | |
* works like jquery's `prev` but combined selector is not supported | |
* | |
*/ | |
var prev = function(target, selector) { | |
var siblings = target.parentNode.children; | |
var previousElementSibling; | |
for (var i = Array.prototype.indexOf.call(siblings, target) - 1; i >= 0; i--) { |
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
/* | |
Pinterest Grid Plugin | |
Copyright 2014 Mediademons | |
@author smm 16/04/2014 | |
@modifier cs09g 02/10/2016 | |
@comment: | |
In the original source, the class of grid element was updated all the time when the page is resized or not. | |
I added one condition to check the page is resized. | |
Referenced from: http://www.jqueryscript.net/layout/Simple-jQuery-Plugin-To-Create-Pinterest-Style-Grid-Layout-Pinterest-Grid.html |
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
{ | |
a0: {b0: c0}, | |
a1: b1, | |
a2: {b2: {c1: d0, c2: d1}} | |
} | |
이런 형태의 JSON 을 보내야 하고, 입력 form을 다음과 같이 설정하였을 때 사용하기 위한 코드이다. | |
<input id="a0.b0"> | |
<input id="a1"> | |
<input id="a2.b2.c1"> | |
<input id="a2.b2.c2"> |
NewerOlder