Skip to content

Instantly share code, notes, and snippets.

@dstyle0210
dstyle0210 / isIE.js
Last active August 29, 2015 14:05
IE구분 (11 및 이하버전)
function isIE() {
var o = [navigator.appName,navigator.userAgent];
return ((o[0] == 'Microsoft Internet Explorer') || ((o[0] == 'Netscape') && (new RegExp("Trident/.*rv:([0-9]{1,}[\.0-9]{0,})").exec(o[1]) != null)));
}
@dstyle0210
dstyle0210 / gist:bf62a83ca9838eb4cb6c
Created August 14, 2014 09:57
webfont적용시 크로스도메인 이슈발생 처리(IE,FF만 적용불가 현상)
원인은 www.test.com 에서 fm.test.com 로 domain이 틀려지기 때문에 IE 랑 FF에서 cross domain resource 참조를 못하여 발생한 것이고,
해결은 아파치 httpd.conf 에 mod_header.so 파일을 추가하고 Cross Origin Resource Sharing 설정을 넣어주어 잡았습니당.
@dstyle0210
dstyle0210 / clearButtonPadding_firefox.css
Created September 13, 2014 13:10
파이어폭스에서 버튼 간격지우기
/* 파이어폭스에서 버튼 간격지우기 */
button{margin:0;padding:0;border:0;background:none;}
button::-moz-focus-inner{ padding: 0;border: 0}
@dstyle0210
dstyle0210 / basic_javascript.html
Created October 16, 2014 06:03
기본 자바스크립트 선언 구분.
<script type="text/javascript">
//<![CDATA[
;function basicFnName(){
try{
}catch(e){
alert("basicFnName"+e);
};
}
//]]>
@dstyle0210
dstyle0210 / jquery.ui.datepicker_koreaWA.js
Last active August 29, 2015 14:10
웹접근성확보 jquery.datepicker
/*
* jQuery UI Datepicker 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Datepicker
*
* Depends:
@dstyle0210
dstyle0210 / html5_d.css
Created January 27, 2015 00:44
[삭제예정] - reset.less 로 통합
/*==========================================================================
HTML5 display definitions
==========================================================================*/
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary {display:block;}
audio,canvas,video {display:inline-block;}
audio:not([controls]) {display:none; height:0;}
[hidden] {display:none;}
figure {margin:0;}
button {border:0 none;padding:0;margin:0;background:transparent;cursor:pointer;}
figcaption {height: 0; width: 0; font-size: 0; line-height: 0; margin: 0; padding: 0; overflow:hidden;}
@dstyle0210
dstyle0210 / dsMixin.less
Last active August 29, 2015 14:17
mixin.less
/* !DStyle Mixin 0.4v */
/**
* 일부 오타수정
* padding,margin영역 일부 mixin 삭제.
*/
/* variables */
@font-color:#333;
@font-size:1em;
@border-color:#ccc;
@dstyle0210
dstyle0210 / tistoryCategoryJson.js
Created April 23, 2015 04:09
[tistory, jquery] Category to JSON (카테고리 목록을 json화)
function tistoryCategoryJson(oId){
var o = {};
// 데이터 추출
function data(tg,dom){
tg.link = $(dom).find(">li>a").attr("href");
tg.cnt = $(dom).find(">li>a>span").text();
$(dom).find(">li>a>span").remove();
tg.title = $(dom).find(">li>a").text();
}
@dstyle0210
dstyle0210 / textareaToByte.js
Created May 14, 2015 08:14
[jquery] textarea 글자수 , 바이트수 체크하기.
/**
* 글자수(바이트 체크)
* @param oid : 글자를 받을 Textarea ID
* @param tid : 바이트 체크된 값 리턴될 엘리먼트 ID
*/
function pubByteCheckTextarea(oid,tid){
$(oid).on("keyup",function(){
var byteTxt = "";
var byte = function(str){
var byteNum=0;
@dstyle0210
dstyle0210 / jquery.runquery.js
Created May 19, 2015 10:00
[jquery] RunQuery
/*
* jQuery runQuery v0.9b - http://dstyle.raonnet.com/runquery_v2/
* Release Date : 2011/10/10 (Date-based Korea)
* Last Modified : 2011/10/27 (Date-based Korea)
*
* Open source under the BSD License.
*
* jQuery 1.6.2 이상에서 정상적으로 동작합니다.
*
* 제작자 : 원용봉([email protected]) by REFLEXION Web Team.