jquery.ui.effect-fade.js 563B

12345678910111213141516171819202122232425262728293031
  1. /*!
  2. * jQuery UI Effects Fade v1.9 stable
  3. * http://jqueryui.com
  4. *
  5. * Copyright 2012 jQuery Foundation and other contributors
  6. * Released under the MIT license.
  7. * http://jquery.org/license
  8. *
  9. * http://api.jqueryui.com/fade-effect/
  10. *
  11. * Depends:
  12. * jquery.ui.effect.js
  13. */
  14. (function( $, undefined ) {
  15. $.effects.effect.fade = function( o, done ) {
  16. var el = $( this ),
  17. mode = $.effects.setMode( el, o.mode || "toggle" );
  18. el.animate({
  19. opacity: mode
  20. }, {
  21. queue: false,
  22. duration: o.duration,
  23. easing: o.easing,
  24. complete: done
  25. });
  26. };
  27. })( jQuery );