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
| /** | |
| * 터치 이벤트 선언 | |
| * @param {Object} element HTML 엘리먼트 | |
| * @param {Function} callback 콜백 함수 | |
| * | |
| * 사용 예: | |
| * tap(document.getElementById('a'), function() { | |
| * console.log('callback!'); | |
| * }); | |
| * |
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 manageClass = {}, | |
| hasClass, addClass, removeClass, toggleClass; | |
| if ('classList' in document.documentElement) { | |
| hasClass = function(elem, className) { | |
| return elem.classList.contains(className); | |
| }; | |
| addClass = function(elem, className) { | |
| elem.classList.add(className); | |
| }; |
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 now = new Date(), | |
| nowYear = now.getFullYear(), | |
| nowMonth = now.getMonth(), | |
| nowDate = now.getDate(); | |
| // 캘린더 | |
| // 사용법: Calendar.drawCal(year, month, document.getElementById('calendar-body')); | |
| // month 는 0부터 11까지임. | |
| var Calendar = { |
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
| /** | |
| * AJAX 로 HTML 가져오기 | |
| * @param {String} html 가져올 HTML 파일명 | |
| * @param {String} targetId HTML 을 삽입할 곳의 ID. 지정 안 하면, body 종료 엘리먼트 바로 앞에 삽입. | |
| */ | |
| var ajaxGetHtml = function(html, targetId, callback) { | |
| var xmlhttp = new XMLHttpRequest(); | |
| xmlhttp.open('GET', html + '.html', true); | |
| xmlhttp.send(); | |
| xmlhttp.onreadystatechange = function() { |
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 Data = function() { | |
| var warehouse = {}; | |
| var count = 1; | |
| return { | |
| reset: function() { | |
| count = 1; | |
| warehouse = {}; | |
| }, | |
| set: function(dom, data) { | |
| if(!dom.__data) { |
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
| <header>Header</header> | |
| <ul> | |
| <li>Item</li> | |
| <li>Item</li> | |
| <li>Item</li> | |
| <li>Item</li> | |
| <li>Item</li> | |
| <li>Item</li> | |
| <li>Item</li> | |
| <li>Item</li> |
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 formatMoney = function(nStr) { | |
| var x, x1, x2, rgx; | |
| nStr += ''; | |
| x = nStr.split('.'); | |
| x1 = x[0]; | |
| x2 = x.length > 1 ? '.' + x[1] : ''; | |
| rgx = /(\d+)(\d{3})/; | |
| while(rgx.test(x1)) { | |
| x1 = x1.replace(rgx, '$1' + ',' + '$2'); | |
| } |
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
| /* 줄 단위 말 줄임 처리 */ | |
| .ellipsis-line { | |
| text-overflow: ellipsis; | |
| overflow: hidden; | |
| display: -webkit-box; | |
| -webkit-box-orient: vertical; | |
| -webkit-line-clamp: 2;/* 줄 수 */ | |
| } |
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
| @import 'normalize.css'; | |
| /* | |
| * HTML5 Boilerplate | |
| * | |
| * What follows is the result of much research on cross-browser styling. | |
| * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, | |
| * Kroc Camen, and the H5BP dev community and team. | |
| */ |
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
| * { | |
| -webkit-box-sizing: border-box; | |
| box-sizing: border-box; | |
| background-repeat: no-repeat; | |
| vertical-align: middle; | |
| -webkit-tap-highlight-color: rgba(0,0,0,0); | |
| tap-highlight-color: rgba(0,0,0,0); | |
| -webkit-appearance: none; | |
| appearance: none; | |
| -webkit-focus-ring-color: rgba(0,0,0,0); |
NewerOlder