Make TOC hideable
[mediawiki.git] / resources / jquery.effects / jquery.effects.highlight.js
blobad9e7bd4d49759fd7f52e0b8dd64bbed18dbbb42
1 /*!
2 * jQuery UI Effects Highlight 1.8.24
4 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
5 * Dual licensed under the MIT or GPL Version 2 licenses.
6 * http://jquery.org/license
8 * http://docs.jquery.com/UI/Effects/Highlight
10 * Depends:
11 * jquery.effects.core.js
13 (function( $, undefined ) {
15 $.effects.highlight = function(o) {
16 return this.queue(function() {
17 var elem = $(this),
18 props = ['backgroundImage', 'backgroundColor', 'opacity'],
19 mode = $.effects.setMode(elem, o.options.mode || 'show'),
20 animation = {
21 backgroundColor: elem.css('backgroundColor')
24 if (mode == 'hide') {
25 animation.opacity = 0;
28 $.effects.save(elem, props);
29 elem
30 .show()
31 .css({
32 backgroundImage: 'none',
33 backgroundColor: o.options.color || '#ffff99'
35 .animate(animation, {
36 queue: false,
37 duration: o.duration,
38 easing: o.options.easing,
39 complete: function() {
40 (mode == 'hide' && elem.hide());
41 $.effects.restore(elem, props);
42 (mode == 'show' && !$.support.opacity && this.style.removeAttribute('filter'));
43 (o.callback && o.callback.apply(this, arguments));
44 elem.dequeue();
46 });
47 });
50 })(jQuery);