[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/jquery/ui/ -> effect-fade.js (source)

   1  /*!
   2   * jQuery UI Effects Fade 1.13.1
   3   * http://jqueryui.com
   4   *
   5   * Copyright jQuery Foundation and other contributors
   6   * Released under the MIT license.
   7   * http://jquery.org/license
   8   */
   9  
  10  //>>label: Fade Effect
  11  //>>group: Effects
  12  //>>description: Fades the element.
  13  //>>docs: http://api.jqueryui.com/fade-effect/
  14  //>>demos: http://jqueryui.com/effect/
  15  
  16  ( function( factory ) {
  17      "use strict";
  18  
  19      if ( typeof define === "function" && define.amd ) {
  20  
  21          // AMD. Register as an anonymous module.
  22          define( [
  23              "jquery",
  24              "./effect"
  25          ], factory );
  26      } else {
  27  
  28          // Browser globals
  29          factory( jQuery );
  30      }
  31  } )( function( $ ) {
  32  "use strict";
  33  
  34  return $.effects.define( "fade", "toggle", function( options, done ) {
  35      var show = options.mode === "show";
  36  
  37      $( this )
  38          .css( "opacity", show ? 0 : 1 )
  39          .animate( {
  40              opacity: show ? 1 : 0
  41          }, {
  42              queue: false,
  43              duration: options.duration,
  44              easing: options.easing,
  45              complete: done
  46          } );
  47  } );
  48  
  49  } );


Generated: Sun Dec 22 01:00:02 2024 Cross-referenced by PHPXref 0.7.1