Mercurial > hg > STI-GWT
comparison war/scripts/jQuery/ui/jquery.effects.highlight.js @ 3:cf06b77a8bbd
Committed branch of the e4D repos sti-gwt branch 16384.
git-svn-id: http://dev.dariah.eu/svn/repos/eu.dariah.de/ap1/sti-gwt-dariah-geobrowser@36 f2b5be40-def6-11e0-8a09-b3c1cc336c6b
author | StefanFunk <StefanFunk@f2b5be40-def6-11e0-8a09-b3c1cc336c6b> |
---|---|
date | Tue, 17 Jul 2012 13:34:40 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2:2897af43ccc6 | 3:cf06b77a8bbd |
---|---|
1 /* | |
2 * jQuery UI Effects Highlight 1.8.14 | |
3 * | |
4 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |
5 * Dual licensed under the MIT or GPL Version 2 licenses. | |
6 * http://jquery.org/license | |
7 * | |
8 * http://docs.jquery.com/UI/Effects/Highlight | |
9 * | |
10 * Depends: | |
11 * jquery.effects.core.js | |
12 */ | |
13 (function( $, undefined ) { | |
14 | |
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') | |
22 }; | |
23 | |
24 if (mode == 'hide') { | |
25 animation.opacity = 0; | |
26 } | |
27 | |
28 $.effects.save(elem, props); | |
29 elem | |
30 .show() | |
31 .css({ | |
32 backgroundImage: 'none', | |
33 backgroundColor: o.options.color || '#ffff99' | |
34 }) | |
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(); | |
45 } | |
46 }); | |
47 }); | |
48 }; | |
49 | |
50 })(jQuery); |