[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

   1  /*!
   2   * jQuery UI Effects Highlight 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: Highlight Effect
  11  //>>group: Effects
  12  //>>description: Highlights the background of an element in a defined color for a custom duration.
  13  //>>docs: http://api.jqueryui.com/highlight-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( "highlight", "show", function( options, done ) {
  35      var element = $( this ),
  36          animation = {
  37              backgroundColor: element.css( "backgroundColor" )
  38          };
  39  
  40      if ( options.mode === "hide" ) {
  41          animation.opacity = 0;
  42      }
  43  
  44      $.effects.saveStyle( element );
  45  
  46      element
  47          .css( {
  48              backgroundImage: "none",
  49              backgroundColor: options.color || "#ffff99"
  50          } )
  51          .animate( animation, {
  52              queue: false,
  53              duration: options.duration,
  54              easing: options.easing,
  55              complete: done
  56          } );
  57  } );
  58  
  59  } );


Generated: Tue Apr 23 01:00:02 2024 Cross-referenced by PHPXref 0.7.1