annotate test-data/res_files/js/jquery.opacityrollover.js @ 71:71d5983dd41e draft

"planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit d75c5bb2b0fc1f53f648a59312f13f9b23e6a6dc"
author brasset_jensen
date Thu, 06 Feb 2020 11:10:41 -0500
parents 9185ca0a7b43
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
61
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
1 /**
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
2 * jQuery Opacity Rollover plugin
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
3 *
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
4 * Copyright (c) 2009 Trent Foley (http://trentacular.com)
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
5 * Licensed under the MIT License:
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
6 * http://www.opensource.org/licenses/mit-license.php
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
7 */
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
8 ;(function($) {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
9 var defaults = {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
10 mouseOutOpacity: 0.67,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
11 mouseOverOpacity: 1.0,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
12 fadeSpeed: 'fast',
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
13 exemptionSelector: '.selected'
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
14 };
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
15
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
16 $.fn.opacityrollover = function(settings) {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
17 // Initialize the effect
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
18 $.extend(this, defaults, settings);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
19
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
20 var config = this;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
21
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
22 function fadeTo(element, opacity) {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
23 var $target = $(element);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
24
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
25 if (config.exemptionSelector)
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
26 $target = $target.not(config.exemptionSelector);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
27
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
28 $target.fadeTo(config.fadeSpeed, opacity);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
29 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
30
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
31 this.css('opacity', this.mouseOutOpacity)
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
32 .hover(
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
33 function () {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
34 fadeTo(this, config.mouseOverOpacity);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
35 },
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
36 function () {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
37 fadeTo(this, config.mouseOutOpacity);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
38 });
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
39
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
40 return this;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
41 };
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents:
diff changeset
42 })(jQuery);