PluginProbe
RSVP and Event Management / 1.3.0
RSVP and Event Management v1.3.0
trunk 0.5.0 0.6.0 0.7.0 0.8.0 0.9.0 0.9.5 1.0.0 1.1.0 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.5.0 1.6.0 1.6.1 1.6.2 1.6.5 1.7.0 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 All 136 releases
rsvp / jquery-ui-1.7.2.custom / development-bundle / ui / effects.highlight.js

effects.highlight.js in RSVP and Event Management 1.3.0, at jquery-ui-1.7.2.custom/development-bundle/ui/effects.highlight.js

49 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*
2 * jQuery UI Effects Highlight 1.7.2
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($) {
14
15 $.effects.highlight = function(o) {
16
17 return this.queue(function() {
18
19 // Create element
20 var el = $(this), props = ['backgroundImage','backgroundColor','opacity'];
21
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");
26
27 // Adjust
28 $.effects.save(el, props); el.show(); // Save & Show
29 el.css({backgroundImage: 'none', backgroundColor: color}); // Shift
30
31 // Animation
32 var animation = {backgroundColor: oldColor };
33 if (mode == "hide") animation['opacity'] = 0;
34
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 }});
43
44 });
45
46 };
47
48 })(jQuery);
49