자바스크립트(javascript) 쿠키(cookie) 사용하기   H 4000

자바스크립에서 쿠키 사용할때.. 불편해서..함수로 만들어 놓고 사용하기.jquery.cookie 를 사용해도 되긴함..function fn_setCookie( name, value, expiredays ) { var todayDate = new Date(); todayDate.setDate( todayDate.getDate() + expiredays ); document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" } function fn_deleteCookie(cookieName) { var expireDate = new Date(); //어제 날짜를 쿠키 ...

라디오버튼 체크여부확인   H 6000

여러개의 라디오 버튼중 하나라도 체크를 했는지 확인if(!radioChecked("radio")){alert('하나이상 체크하셔야 합니다.');return;}function radioChecked(name) { var _flag = false; $('input:radio[name="'+name+'"]').each(function() { if($(this).is(":checked")) { _flag = true; } }); return _flag; }그냥 간단하게 사용할때.. 유용.

jQuery checkbox 전체선택   H 6000

체크박스 전체 선택을 jquery 로 그냥 간단하게 만들었는데...이게 이상하게... 전체선택후 해제한다음에 다시 체크하면 전체 선택이되지 않는..이상한 일이... 버그인가??그래서 해결한 방법... 소스참조.$(document).ready(function(){  $("#chk_all").on("click",function(){      /*   ## 버그 인가[선택해제후 다시 선택이 안됨.]   if($(this).is(":checked"))   {  &...

[jQuery] 이미지 모바일 크기에 맞게 조절   H 7000

웹사이트는 있는 상태에서 모바일페이지를 제작을 할시..게시글도 웹에서 나오는걸 그대로 보여주길 원한다.. 다른건 문제가 안되는데..게시글중에 이미지가 들어가 있으면 리사이즈 해줘야 함. window.onload=function(){ imgSize(); }function imgSize(){ var img = $(".memberTbl img");  img.each(function() {      var imgWidth = $(this).width();  var imgHeight = $(this).height();   ...

[xmlDom] xml 읽어와 뿌리기 javascript   H 10000

xmlDom 을 편하게 사용하기 위한 javascript 함수화..ㅋ <?xml version='1.0' encoding='utf-8'?> <parts>  <part>   <name>송토리</name>   <addr>서울시 광진구 화양동</addr>  </part>  <part>   <name>장동건</name>   <addr>우리들의 천국</addr>  </part>  ...

jQuery 슬라이드 플러그인 Cycle2   H 5000

JQUERY를 위한 슬라이드 플러그인 Cycle2  해당 슬라이드 DIV 나 이미지에 마크업 만주면 자동 슬라이드데모나 예저 많음 !  자세한 정보는 http://jquery.malsup.com/cycle2/  

[Jquery] select box 옵션   H 6000

jQuery로 선택된 값 읽기 jQuery("#selectBox option:selected").val(); jQuery("select[name=name]").val();   jQuery로 선택된 내용 읽기 jQuery("#selectBox option:selected").text();   선택된 위치 var index = jQuery("#test option").index(jQuery("#test option:selected"));   -------------------------------------------------------------------   // Add options to the end of a select jQuery("#selectBox").append("<option value='1'&g...

jquery_calendar(제이쿼리로 만든 달력)   H 4000

내용없음. 첨부파일 확인. 출처 : 기억이 잘...   jquery_calendar.zip

모바일웹 슬라이드 ( SWIPE )   H 12000

이제 시시한 롤링은 지겹다!   다음이나 네이버 메인에 보면 손가락으로 휙휙 저으면 바뀌기...   일명 swipe !!   jqueryMobile 로 아주 간단하게 구현가능합니다.   아래 두개의 js파일 불러오고.. 첫번째꺼는 jquery 두번째는 jqueryMobile js 파일 http://code.jquery.com/jquery-1.6.1.min.js http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js 그리고 아래코드 보면 끝!$(document).ready(init); var nSwipeCount = 0; var nSw...

javascript 3자리마다 컴마찍기   H 4000

formatNumber 같은 3자리마다 컴마찍어주는 함수가 필요하다면!!   특히 javascript로 된걸 원한다면..   이걸로.. 정규식 이용 아주 간단하게 처리됨!   function commify(n) {    var reg = /(^[+-]?\d+)(\d{3})/;    n += '';     while (reg.test(n))        n = n.replace(reg, '$1' + ',' + '$2');    return n;}