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
| // jQuery Extend addIdx : dstyle | |
| (function($){$.fn.addIdx = function(s){var s=(!s)?"idx":s;$(this).each(function(n,m){m[s] = n;});return this;};})(jQuery); | |
| // jQuery Extend unClick : dstyle | |
| (function($){$.fn.unclick = function(){this.each(function(n,m){m.onclick=function(){return false;}});return this;};})(jQuery); | |
| //jQuery Extend rebind : dstyle | |
| (function($){$.fn.rebind = function(e,f){this.unbind(e).bind(e,f);return this;};})(jQuery); | |
| function strowCarousel(objDiv,h){ | |
| jQuery(function(){ | |
| // object setting |
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
| // onoff extend | |
| (function($) { | |
| $.fn.onoff = function(n, on, off) { | |
| var n = n; | |
| var on = (!on) ? "On." : on + "."; | |
| var off = (!off) ? "Off." : off + "."; | |
| $(this).each(function(i) { | |
| this.src = (this.src).replace(on, off); | |
| if (i == n) { | |
| this.src = (this.src).replace(off, on); |
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
| // colorbox 초기화 한 후에 다시 띄우기. | |
| function onlyCallOrderOpen(){ | |
| var colorboxOptions = { | |
| inline : true, | |
| width : "100%", | |
| href : "#onlyCallOrder", | |
| onClosed: function () { | |
| clearInterval(timer); | |
| $(".certiInput").hide(); | |
| $.colorbox.remove(); |
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
| 'use strict'; | |
| var gulp = require('gulp'); | |
| var sass = require('gulp-sass'); | |
| // 자세한 옵션은 "https://github.com/sass/node-sass#options" 에서 확인 필요. | |
| var sass_opt = { | |
| /** | |
| * outputStyle (Type : String , Default : nested) | |
| * CSS의 컴파일 결과 코드스타일 지정 |
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
| { | |
| "remove-empty-rulesets": true, | |
| "always-semicolon": true, | |
| "quotes": "double", | |
| "color-case": "lower", | |
| "exclude": [ | |
| ".git/**", | |
| "node_modules/**", | |
| "bower_components/**" | |
| ], |
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
| var path = require('path'); | |
| function getFolder(file){ | |
| return path.parse( path.parse(file.path).dir ).base; | |
| }; | |
| var pathUrl = "/src/css/test.css"; | |
| var myFolder = getFolder(pathUrl); // return "css" | |
| console.log(myFolder); |
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
| // 코딩도장 공부 | |
| // http://codingdojang.com/scode/350 | |
| var s = 0; | |
| for(i=1;i<1000;i++){ | |
| s += (i%3==0 || i%5==0) ? i : 0; | |
| } | |
| console.log(s); |
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
| // 코딩도장 공부 | |
| // http://codingdojang.com/scode/365 | |
| var max = 5000; | |
| // 숫자들의 합 구하기. | |
| var total = 0; | |
| (function(){ | |
| for(i=0;i<max;i++){ | |
| total += i; | |
| }; |
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
| // 코딩도장 공부 | |
| // http://codingdojang.com/scode/393 | |
| var samText = ""; | |
| for(i=1;i<10000;i++){ | |
| samText += i+""; | |
| }; | |
| var total = (samText.match(/8/g)).length; | |
| console.log(total); |
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
| // 코딩도장 공부 | |
| // http://codingdojang.com/scode/406 | |
| var m = Math.floor(Math.random()*100); // 총건수 | |
| var n = Math.floor(Math.random()*10)+1; // 한페이지에 보여줄 게시물수 (n은 1보다 크거나 같다) | |
| var paging = (0<m) ? Math.floor(m/n) : 0; // 총건수가 0개면, 리턴도 0개. | |
| paging = (paging!=0 && m%n!=0) ? paging + 1 : paging; | |
| console.log(m+","+n+","+paging); |