jQuery.fx.off

· 2018-01-04 (목) 10:03:44 · 2689

jQuery.fx.off


설명 : 모든 애니메이션을 전역으로 비활성화하십시오.

이 속성을 true로 설정하면 true모든 애니메이션 메서드는 효과를 표시하는 대신 요소를 최종 상태로 즉시 설정합니다. 이는 몇 가지 이유로 바람직 할 수 있습니다.

jQuery는 리소스가 적은 장치에서 사용되고 있습니다.
사용자가 애니메이션에 접근성 문제가 발생했습니다.
속성을으로 설정하면 애니메이션을 다시 사용할 수 있습니다 false.

예:
애니메이션 켜기 / 끄기 토글

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>jQuery.fx.off 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>
 
<input type="button" value="Run">
<button>Toggle fx</button>
<div></div>
 
<script>
var toggleFx = function() {
  $.fx.off = !$.fx.off;
};
toggleFx();
$( "button" ).click( toggleFx );
$( "input" ).click(function() {
  $( "div" ).toggle( "slow" );
});
</script>
 
</body>
</html>

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

개발자팁

5,403건

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
jQuery 18-01-25 조회 4,534
JavaScript 18-01-24 조회 8,557
기타 18-01-24 조회 2,814
웹서버 18-01-24 조회 3,069
기타 18-01-22 조회 7,861
기타 18-01-22 조회 5,784
웹서버 18-01-18 조회 6,889
PHP 18-01-12 조회 6,388
jQuery 18-01-10 조회 3,892
jQuery 18-01-10 조회 2,781
jQuery 18-01-10 조회 3,438
MySQL 18-01-08 조회 3,594
jQuery 18-01-08 조회 2,927
jQuery 18-01-08 조회 3,161
jQuery 18-01-08 조회 4,879
PHP 18-01-05 조회 4,817
jQuery 18-01-04 조회 4,616
jQuery 18-01-04 조회 3,248
jQuery 18-01-04 조회 2,690
jQuery 17-12-06 조회 2,875
jQuery 17-12-06 조회 3,641
jQuery 17-12-06 조회 3,464
jQuery 17-12-04 조회 2,843
jQuery 17-12-04 조회 2,098
jQuery 17-12-04 조회 3,043
jQuery 17-12-04 조회 2,909
jQuery 17-11-25 조회 2,713
jQuery 17-11-25 조회 2,651
jQuery 17-11-25 조회 2,336
jQuery 17-11-24 조회 2,391