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
| /** | |
| * 터치 이벤트 선언 | |
| * @param {Object} element HTML 엘리먼트 | |
| * @param {Function} callback 콜백 함수 | |
| * | |
| * 사용 예: | |
| * tap(document.getElementById('a'), function() { | |
| * console.log('callback!'); | |
| * }); | |
| * |
OlderNewer