링크 · http://api.jquery.com/animated-selector/
참고 · http://findfun.tistory.com/71
* 개인적으로 공부하면서 올리는 게시글입니다.
* 'https://oscarotero.com/jquery/' 페이지 번역이 목표입니다.
animated selector
설명: 선택자가 실행되는 시점의 진행중인 애니메이션의 요소를 찾는다.
참고: 효과 모듈이 없는 커스텀 jQuery를 사용하는 경우 해당 선택자는 오류가 발생합니다.
+추가
-이유: 이 선택자는 css가 아닌 확장 jQuery 입니다.
예제: 애니메이션 요소를 찾아 색상을 변경합니다.
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>animated demo</title> <style> div { background: yellow; border: 1px solid #AAA; width: 80px; height: 80px; margin: 0 5px; float: left; } div.colored { background: green; } </style> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> </head> <body>
<button id="run">Run</button>
<div></div> <div id="mover"></div> <div></div>
<script> $( "#run" ).click(function() { $( "div:animated" ).toggleClass( "colored" ); });
function animateIt() { $( "#mover" ).slideToggle( "slow", animateIt ); }
animateIt(); </script>
</body> </html>
'!' 카테고리의 다른 글
[jQuery]:Class Selector(".class name") (0) | 2018.04.15 |
---|---|
[jQuery]:All Selector ("*") (0) | 2018.04.15 |
Oracle 기초 2 (0) | 2015.11.23 |
Oracle 기초1 (0) | 2015.11.19 |
오라클 계정 관리 (0) | 2015.11.05 |