본문 바로가기
728x90
반응형

JavaScript14

react, typescript 유용한사이트 타입스크립트 : https://driip.me/b812974b-3974-46e3-829e-1476b9b30c94 TypeScript 타입 정의 읽기 — 몇 가지만 알면 쉬워요 아마 조금 더 쉬워질걸요? driip.me 리액트 : https://react.gg/visualized 2023. 4. 11.
모바일 레이어 팝업 띄울때 스크롤 막기 레이어 띄울때$("body").bind('touchmove', function(e){e.preventDefault()}); 레이어 닫을때 $("body").unbind('touchmove'); 위와 같이 사용하면 된다. 2016. 2. 3.
JS BUBBLE SORT var bubble = function(nums){ var temp; for (var i = 0; i nums[j+1] ){ temp = nums[j]; nums[j] = nums[j+1]; nums[j+1] = temp; } } console.log(nums[i]); } }; bubble([12, 2,3, 4, 10]); 2014. 4. 24.
높이에 따라서 세로중앙정렬되게 하는스크립트 window.onload = onLoadHandler; window.onresize = resizeSwfDiv; var isFull = false; function onLoadHandler() { resizeSwfDiv(); } function isFullSetting( _isFull ) { isFull = Boolean(_isFull); } function resizeSwfDiv() { var _div = document.getElementById("flashWrap"); if(navigator.userAgent.indexOf('MSIE')!=-1){ var _bh = document.body.clientHeight; if(_bh < 768){ _bh = 0; _div.style.margin = _bh.. 2011. 5. 4.
비IE 스크랩하기 javascript function scrapFunc() { if(navigator.appName == 'Microsoft Internet Explorer'){ var mvstring =''; window.clipboardData.setData('text',mvstring); alert("스크랩 주소가 복사되었습니다."); } else{ prompt("아래의 주소를 복사하여 블로그, 카페등에 붙여넣으시면됩니다.",""); } 현재 포털에서는 복사하기 즉, 스크랩하기가 내부적으로 플래시로 처리해놓았다. 하지만 플래시를 전혀모르고 혹시 Iphone등을 대응하기 위해서 한가지 비스므리하게 가는 방법을 위에 써놓았다. IE와 비IE를 구분하고 IE가 아닌경우에는 프롬프트 형식으로 하는것이다. } function downloadFu.. 2011. 3. 7.
html5 관련 유용한 사이트 Here are a few useful HTML5 & CSS3 resources to get you started: http://en.wikipedia.org/wiki/HTML5 http://www.html5rocks.com/ http://diveintohtml5.org/ http://html5demos.com/ http://www.css3.info/ http://www.html5test.com/ http://www.w3schools.com/html5/html5_reference.asp http://dret.typepad.com/dretblog/html5-api-overview.html ...and a few great HTML5 showcases: http://www.apple.com/html5/ ht.. 2010. 10. 18.
아이폰/아이팟/아이패드 체크 스크립트 $(document).ready(function(){ if(navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i)) { document.getElementById("flashWrap").style.display="none"; document.getElementById("gnb").style.display=""; } else { document.getElementById("flashWrap").style.display=""; document.getElementById("gnb").style.display="none"; }}); 2010. 10. 15.
[펌] JQuery 관련 자료 공식사이트 www.jquery.com 현재 버전 : 1.4.2 (10/02/19) 다운로드 http://docs.jquery.com/Downloading_jQuery 도큐멘트 http://docs.jquery.com/Main_Page tutorials http://docs.jquery.com/Tutorials JQUERY UI http://jqueryui.com jquery란? jQuery는 자바스크립트와 HTML 사이의 상호작용을 강조하는 경량화된 웹 애플리케이션 프레임워크이다. 존 레시그에 의해, 2006년 뉴욕 시 바캠프(Barcamp NYC)에서 릴리즈되었다. jQuery는 MIT 라이선스와 GNU 일반 공중 사용 허가서의 듀얼 라이선스 하의 자유 오픈 소프트웨어이다. 사용법은 가장 잘 정리해둔 .. 2010. 10. 15.
e-preventDefault 와 return false 의 차이점... http://tumblog.themeforest.net/post/801038252/the-difference-between-return-false-and 2010. 10. 15.
ie에서 PNG 투명도먹는 필터~! function setPng24(obj) { obj.width=obj.height=1; obj.className=obj.className.replace(/\bpng24\b/i,''); obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" obj.src=''; return ''; }; js파일에 이부분을 넣어주면 된다. 로 사용을 하면 IE에서도 PNG의 투명이 먹는다. 2010. 10. 15.
javascript window.open 이용한 새창열기 javascript 윈도우 오픈 window.open() 심플 사용법 window.open("새창 페이지 URL", "name즉이름", "속성, 즉 width등의 속성값이다."); 속성값 속성의 default 값은 yes다 menubar=no or yes : 메뉴바 삭제, 나오게하기 toolbar=no or yes : 툴바 삭제 location=no or yes : 주소표시줄 삭제 status=no or yes : 상태표시줄 삭제 scrollbars=no or yes : 스크롤바 없애기 fullscreen: 최창크기로 열기 width : 가로사이즈 height : 세로 사이즈 top :위에서부터의 높이값 left : 좌측으로 부터의 위치값 사용 예 내블로그새창열기 내블로그 새창열기 2010. 10. 15.
테이블에 마우스오버하면 그줄 전부가 색이 달라지는 javascript var arrayOfRolloverClasses = new Array(); var arrayOfClickClasses = new Array(); var activeRow = false; var activeRowClickArray = new Array(); function highlightTableRow() { var tableObj = this.parentNode; if(tableObj.tagName!='table')tableObj = tableObj.parentNode; if(this!=activeRow){ this.setAttribute('origCl',this.className); this.origCl = this.className; } this.className = arrayOfRolloverCl.. 2010. 10. 15.
728x90
반응형