1. 배열정렬function compareNumbers(a,b) { return a-b;} var numArray = [13,2,31,47,5]; alert(numArray.sort(compareNumbers)); // 2,5,13,31,47 출력 alert(numArray.reverse()); // 47,31,13,5,2 출력 출처 : javascript cookbook 2. 배열 복사var numArray = [13,2,31,47,5]; var newArray = numArray.slice(1,3) // 1번째부터 3번째미만 alert( numArray +" : "+ newArray ); // 13,2,31,47,5 : 2,31 출력 //IE8 이하버젼 if(!Array.prototype.indexO..
1. 랜덤 변수 /* MathRandomVal * $min : 최소값 * $max : 최대값 * return : 범위내에 랜덤값 리턴 */ function mathRandomVal($min, $max) { return Math.floor(Math.random()*($max-$min+1)+$min); } 2. ID 속성값 가져오기 /* * compStyle : ID의 속성값을 가져온다. * $elemId : id 값 * $property : id 속성 * return : id 속성값 */ function compStyle($elemId,$property) { var elem = document.getElementById($elemId); var style; if (window.getComputedStyle..
출처 : http://www.snorkl.tv/2010/11/tweenlite-tweens-with-constant-speed-independent-of-distance-traveled/ /* * $start : 시작 점 * $end : 끝나는 점 * $pixlsPerSeconds : 픽샐당 움직일 시간 (100 => 1픽셀당 움직일시간 0.1초) * $acceleration : 증가값 * return : 거리당 움직일 시간 */ function getDuration($start:Number , $end:Number ,$pixlsPerSeconds:Number=100 ,$acceleration:Number=0):Number { var duration:Number = Math.abs(($start - $e..
출처 : http://www.snorkl.tv/2010/12/easy-breezy-3d-card-flip-effect-with-flash-as3-and-our-good-buddy-timelinemax/ import com.greensock.*; import com.greensock.easing.*; //startValues for the card back flipper.back.rotationY = -90; flipper.back.alpha=0; //speed of 90 degrees of flip var flipSpeed:Number = .5; //create TimelineMax instance var tl:TimelineMax = new TimelineMax({paused:true}); //flip..
1. 테이블 속성 접근성설명 : http://codepen.io/mctenshi/pen/LDuoc스팩 : http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#attr-th-scope th 속성 설명(시각장애인들을 위한 접근성을 고려할때는 필요한 태그) scope="row" 가로(행) scope="col" 세로(열) 2. 테이블 기본 Users thead th thead th tbody th tfoot tfoot tbody th tbody td tbody td tbody th tbody td tbody td 3. id, hearder 사용 객실요금안내 평일 정상요금 회원요금 개인/법인 지정 대여 평일 400,000 83..
Effects version added: 1.0 1. .animate( properties, [duration,] [easing,] [complete] ) 2. .animate( properties, options ) : CSS 속성 집합의 사용자 지정 애니메이션을 수행 properties : 애니메이션쪽으로 이동합니다그렇게 CSS의 properties지도 속성. options : 추가 옵션 지도 방법으로 전달할 수 있습니다. 지원되는 키 : duration : 문자열이나 애니메이션이 실행됩니다 얼마나 오래 결정 번호입니다. easing : 전환에 사용할 기능을하는 완화 나타내는 문자열입니다. complete : 애니메이션이 완료되면 호출하는 함수. step : 애니메이션의 각 단계 이후에 호출하는 함수..
# 폰트 임베드 @font-face{ font-family : Graublauweb;src:url('Graublauweb.eot'); /* ie9 호환성 모드 */src:url('Graublauweb.eot?') format('eot'), /* ie6~8 호환성 모드 */url('Graublauweb.woff') format('woff'), /* 현대 브라우저 */url('Graublauweb.ttf') format('truetype'), /* 사파리, 안드로이드 ios */url('Graublauweb.svg#svgGrauweb') format('svg'); /* 레거시 ios */} # 폰트 크기 비교 표 (pt, px, em, %) body { font-size: 62.5%; // 1em =>10p..
as3awss3libActionScript 3.0 library for interacting with Amazon S3 http://code.google.com/p/as3awss3lib/ as3soundeditorlib : Actionscript 3.0 library for sound editing http://code.google.com/p/as3soundeditorlib/ as3ds : AS3 Data Structures For Game Developers http://code.google.com/p/as3ds/ ASCOLLADA http://code.google.com/p/ascollada/ As3Crypto : ActionScript 3 Cryptography Library http://crypt..
- Total
- Today
- Yesterday