annotate test-data/res_files/js/jquery.opacityrollover.js @ 63:11708af40030 draft

planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit a461e07471d3897046e14389171a2c03d09b912d
author pierre.pouchin
date Thu, 24 Jan 2019 13:09:46 -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);