스마트 에디터2에서 이미지 삽입 후 정렬이나 크기 조정 옵션을 설정 하는 방법 GitHub : https://github.com/naver/smarteditor2/issues/36 를 참고하여 적용 할것.
text ... var data = $('li.someclass').metadata(); if ( data.some && data.some == 'data' ) alert('It Worked!'); @Reference http://phpschool.com/gnuboard4/bbs/board.php?bo_table=forum&wr_id=146638&page=3 http://stackoverflow.com/questions/4189036/custom-data-in-xhtml-1-0-strict
요소객체 DOM 속성을 반환,설정 elem.checkedtrue (Boolean) Will change with checkbox state$(elem).prop("checked")true (Boolean) Will change with checkbox stateelem.getAttribute("checked")"checked" (String) Initial state of the checkbox; does not change$(elem).attr("checked")(1.6)"checked" (String) Initial state of the checkbox; does not change$(elem).attr("checked")(1.6.1+)"checked" (String) Will change with..
바코드 폰트, 웹폰트 @font-face{ font-family:C39TWttf; src:url(C39TW.TTF);} @font-face{ font-family:C39TWeot; src:url(C39TW.eot);} .bcode{font-family:C39TWttf,C39TWeot;} 사용예시 기본 : 바의 넓이 1px, 굵은바의 넓이 2px, 색상 검정 barcode(문자열, 바코드의 세로길이); // 필수 예시1 barcode(문자열, 바코드의 세로길이, 바의 넓이, 굵은바의 넓이); // 예시 2 barcode(문자열, 바코드의 세로길이, 바의 넓이, 굵은바의 넓이, 스페이스의 넓이, 굵은 스페이스의 넓이) // 예시 3 barcode(문자열, 바코드의 세로길이, 바의 넓이, 굵은바의 넓이, 스페..
즐겨찾기에 다음을 추가 MRI : javascript:function loadScript(scriptURL) { var scriptElem = document.createElement('SCRIPT'); scriptElem.setAttribute('language', 'JavaScript'); scriptElem.setAttribute('src', scriptURL); document.body.appendChild(scriptElem);}loadScript('http://westciv.com/mri/theMRI.js'); XRAY : javascript:function loadScript(scriptURL) { var scriptElem = document.createElement('SCRIPT'); s..
선택된 요소에 jQuery 메서드를 한꺼번에 연결해서 적용되게 한다. 체인 적용전 $("#id").val("Click me"); $("#id").addClass("cssclass"); $("#id").css({"width":"300px"}); $("#id").click(function(e){ alert('hello'); }) 체인 적용후 (들여쓰기와 줄바꿈을 이용할 수 있다.) $("#id").val("Click me").addClass("cssclass").css({"width":"300px"}) .click(function(e){ alert('hello'); })
var mobileKeyWords = new Array('iPhone', 'iPod', 'BlackBerry', 'Android', 'Windows CE', 'LG', 'MOT', 'SAMSUNG', 'SonyEricsson'); for (var word in mobileKeyWords){ if (navigator.userAgent.match(mobileKeyWords[word]) != null){ location.href = "http://m.domain.com"; break; } }
jQuery(document).ready(function(){ $(document).mousemove(function(e){ arr_mousexy["x"] = e.pageX; arr_mousexy["y"] = e.pageY; }); });
DOM 프로퍼티 attributes :현재 노드에 대한 속성 목록을 반환 parentNode :현재 노드의 부모노드 반환 기본구문: objParentNode = xmlDocumentNode.parentNode childNodes :현재 노드의 모든 하위노드 목록 반환 기본구문)objNodeList = node.childNodes[n] previousSibling : 현재 노드의 바로 이전 형제 노드 반환, 없으면 null 반환 nextSibling : 현재 노드의 바로 다음 형제 노드를 반환, 없으면 null 반환 nodeType : 주어진 노드에 대한 DOMtype 지정한다 기본구문)numNodeType = xmlDocNode.NodeType; Details)12가지의 정수값을반환한다 value ---..
getImageResizedWH([max width,max height],[image width,image height]); mw = max width mh = max height cw = image width ch = image height getImageResizedWH([100,100],[cw,ch]) 일 경우 가로 세로 모두 최대값에 영향을 받음 getImageResizedWH([100,0],[cw,ch]) 일 경우 가로만 최대값에 영향을 받음 getImageResizedWH([0,100],[cw,ch]) 일 경우 세로만 최대값에 영향을 받음 function getImageResizedWH(arrmx,arrcrnt) { mw = arrmx[0]; mh = typeof(arrmx[1]) == "un..
importJS(jfunc,jsrc,jchar) jfunc : jsrc에 있는 기본함수 or 찾을 함수 jsrc : 스크립트 경로 jchar : charset jsrc가 없으면 jfunc을 이용 jfunc는 경로형 함수명 (예 : _module_js_func == /module/js/func.js) function importJS(jfunc,jsrc,jchar) { if(!function_exists(jfunc)) { if(typeof jsrc == "undefined" || jsrc == "") { jsrc = jfunc.replace(/_/gi,"/"); jsrc = jsrc+".js"; } ojs = document.createElement("script"); ohead = document.docu..
onerror=handleErr function handleErr(msg,url,l) { var txt=""; txt="There was an error on this page.\n\n" txt+="Error: " + msg + "\n" txt+="URL: " + url + "\n" txt+="Line: " + l + "\n\n" omsg = $("errmsg"); if(typeof(omsg) == "object") { omsg = document.createElement("div"); document.body.insertBefore(omsg,document.body.childNodes[0]); omsg.id = "errmsg"; try{ omsg.setStyle({"padding":"5px","back..