테스트 사이트 - 개발 중인 베타 버전입니다

jQuery.fx.interval

· 7년 전 · 2295

jQuery.fx.interval

 

설명 : 애니메이션이 실행되는 속도 (밀리 초)입니다.

이 property는 버젼 3.0 이후는 추천되어 있지 않습니다 requestAnimationFrame. 또 ,이 Methods 를 지원하고있는 브라우저에서는 효과가 없습니다 .

지원하지 않는 브라우저 requestAnimationFrame에서는이 속성을 변경하여 애니메이션이 실행되는 간격을 조정할 수 있습니다. 기본값은 13 밀리 초입니다.

jQuery는 하나의 전역 간격을 사용하기 때문에이 속성의 변경 사항을 적용하려면 애니메이션을 실행하지 않아야합니다. 그렇지 않으면 모든 애니메이션이 중지되어야합니다.

예:
모든 애니메이션이 적은 프레임으로 실행되도록합니다.

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>jQuery.fx.interval demo</title>
  <style>
  div {
    width: 50px;
    height: 30px;
    margin: 5px;
    float: left;
    background: green;
  }
  </style>
  <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
 
<p><input type="button" value="Run"></p>
<div></div>
 
<script>
jQuery.fx.interval = 100;
$( "input" ).click(function() {
  $( "div" ).toggle( 3000 );
});
</script>
 
</body>
</html>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

게시글 목록

번호 제목
15969
jQuery .jquery
15968
15967
jQuery .is()
15966
15965
15964
15963
15962
jQuery .index()
15961
15960
15959
jQuery .html()
15958
15957
jQuery .hide ()
15956
15955
15954
15953
15952
15949
15947
15946
15945
15944
15942
15941
15940
15939
15938
15937
15936