본문 바로가기

Develop/Javascript

(10)
상단 고정 레이어 - div 스크롤 내려도 윗쪽에 고정 안녕하세요.. 상단 고정 div 레이어 스크립트에 대해서 설명드립니다~ 1. head 태그 안에 스타일(css) 적용 (border, align, color padding 은 수정해서 사용하시면 됩니다^^) 2. body에 적용할 div 생성 내용 3. jquery 스크립트가 import 되어 있는지 확인 4. document가 ready 상태가 되면 스크립트 실행var bannerOffset = $( '.topFixBanner' ).offset(); $( window ).scroll( function() { //window에 스크롤링이 발생하면 if ( $( document ).scrollTop() > bannerOffset.top ) { // 위치 및 사이즈를 파악하여 미리 정한 css class를 ..
도로명 주소찾기 작업 (귀찮은작업..) 처음 작업하는데 다시 또 작업하기 귀찮아서 정리 해놓을께요.. 도로명 db는 약 860mb인가 그래요.. 데이터는 약 600만건 정도 되구요.. 예전 우편번호는 5-6만건이였는데...100배ㄷㄷ;;db에 insert하려고 데이터 정리하는데만해도 고생했어여..ㅠㅠ DB테이블은 CREATE TABLE [dbo].[ZIPCODE_NEW]([ZIPCODE] [varchar](7) NULL,[SIDO] [varchar](20) NULL,[GUGUN] [varchar](20) NULL,[DONG] [varchar](60) NULL,[DORO] [varchar](60) NULL,[NUM] [varchar](5) NULL,[NUM2] [varchar](5) NULL) ON [PRIMARY] 위와 같이 구성했구요.. 데..
window.print() 델리게이트함수 (프린트 전, 후) document.onload = doPrint();function doPrint() {  //프린트 함수 호출하기 전. window.onbeforeprint = function() {  document.getElementById("popupWrap").className = "";  document.getElementById("popupCont1").className = ""; } window.onafterprint = function() {  //프린트 callback 함수  document.getElementById("popupWrap").className = "popWrap";  document.getElementById("popupCont1").className = "popCont"; } win..
javascript 의 Remove Tag var inputStr = document.getElementById("elementId").innerHTML; inputStr = inputStr.replace(/&(lt|gt);/g, function (strMatch, p1){ return (p1 == "lt")? ""; }); var stripStr = inputStr.replace(/]+(>|$)/g, ""); document.getElementById(iMenuDoc).innerHTML = stripStr; 함수로 만들어 놓았으면 더욱 좋으련만 지금은 시간이 없어서..ㅠㅠ innerHTML로 내용 가져와서 테그를 삭제하고 텍스트만 다시 넣어주는 그런 소스 입니다. 조금만 보시면 다들 아실꺼에요~~ by. xranma
모바일웹 - 주소창 숨기기 window.scrollTo(0, 1); //끝
Javascript parseInt(08)=0? parseInt(09)=0? parseInt 함수는 8진수를 반환하기 때문에 parseInt(08,10) 과 같이 10진수 반환하게끔 명시 해주어야 한다..!! 그냥 parseInt 함수에 ,10 붙이는 습관을 들여야 겟다.
jQuery를 이용한 이미지 갤러리 예제 TN3 Gallery TN3 Gallery is our own fantastic and professional jQuery image gallery plugin that includes slideshow capabilities. Features include a fullscreen option, dynamic image sizing, document linking, multiple albums and mouse wheel navigation. It can be skinned with CSS to match your site’s theme and it’s compatible with all modern desktop and mobile browsers and is also search engine frie..
Javascript UTF8 Encode Decode function encodeURL(str){ var s0, i, s, u; s0 = ""; // encoded str for (i = 0; i = 0x30) && (u = 0x41) && (u = 0x61) && (u