Bug 20489 Configure illegal file characters https://bugzilla.wikimedia.org/show_bug...
[mediawiki.git] / js2 / mwEmbed / jquery / jquery.ui / ui / effects.highlight.js
blob680bacd7d6e5cc9f4f6e8ba94d568c4142c85035
1 /*
2  * jQuery UI Effects Highlight 1.7.1
3  *
4  * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
5  * Dual licensed under the MIT (MIT-LICENSE.txt)
6  * and GPL (GPL-LICENSE.txt) licenses.
7  *
8  * http://docs.jquery.com/UI/Effects/Highlight
9  *
10  * Depends:
11  *      effects.core.js
12  */
13 (function($) {
15 $.effects.highlight = function(o) {
17         return this.queue(function() {
19                 // Create element
20                 var el = $(this), props = ['backgroundImage','backgroundColor','opacity'];
22                 // Set options
23                 var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
24                 var color = o.options.color || "#ffff99"; // Default highlight color
25                 var oldColor = el.css("backgroundColor");
27                 // Adjust
28                 $.effects.save(el, props); el.show(); // Save & Show
29                 el.css({backgroundImage: 'none', backgroundColor: color}); // Shift
31                 // Animation
32                 var animation = {backgroundColor: oldColor };
33                 if (mode == "hide") animation['opacity'] = 0;
35                 // Animate
36                 el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
37                         if(mode == "hide") el.hide();
38                         $.effects.restore(el, props);
39                 if (mode == "show" && $.browser.msie) this.style.removeAttribute('filter');
40                         if(o.callback) o.callback.apply(this, arguments);
41                         el.dequeue();
42                 }});
44         });
48 })(jQuery);