일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 전화번호 형식 자동 변환
- jquery_cheat_sheet #jquery_quick_api_reference
- ajax 배열
- i_tail
- ajax 배열 파라미터
- eclipse 다국어
- jquery_api #jquery #api
- 화면보호기 실행 방지
- DIV 팝업 이외 영역 클릭 시 팝업 닫기
- 팝업 종료
- eclipse 폰트
- JSP Standard Tag Library (JSTL) Tutorial
- 근무날짜 경력계산
- Spring Annotation
- #오라클 데이터 복구
- 엑셀 UPDATE
- javascript Camel
- 여러줄 한줄로
- 폴더만 남기고 파일만 삭제
- eclipse properties
- 탭과 클릭 focus 이벤트 구분
- 트리거 이벤트
- jQuery 백스페이스
- 허드슨 포트 변경
- 뒤로가기 방지
- javascript 낙타
- 스킵 네비게이션
- css 말줄임
- taglib 만들기
- 시퀀스 초기화 프로시져
Archives
- Today
- Total
Hi~ Summers!!
jquery shuffle (jquery function) 본문
출처 : https://github.com/yelotofu/lab/blob/master/jquery/snippets/shuffle/jquery.shuffle.js
<script type="text/javascript">
(function($){$.fn.shuffle = function() {return this.each(function(){var items = $(this).children().clone(true);return (items.length) ? $(this).html($.shuffle(items)) : this;});}$.shuffle = function(arr) {for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i), x = arr[--i], arr[i] = arr[j], arr[j] = x);return arr;}})(jQuery);</script>이렇게 하면 함수를 사용할 때 shuffle을 사용할 수 있다!$t = $("div ul").shuffle(); 이런식으로 !!!!shuffle 관련 링크 : http://jsfiddle.net/mW64X/
Comments