Mercurial > repos > brasset_jensen > srnapipe
annotate lib/sRNAPipe/js/jquery.opacityrollover.js @ 65:0e9adbd82bb4 draft
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit a623ac00600191204ede63c45862a7fbb561afd2
| author | brasset_jensen |
|---|---|
| date | Wed, 30 Jan 2019 02:41:24 -0500 |
| parents | 967512924317 |
| children |
| rev | line source |
|---|---|
|
64
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
1 /** |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
2 * jQuery Opacity Rollover plugin |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
3 * |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
4 * Copyright (c) 2009 Trent Foley (http://trentacular.com) |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
5 * Licensed under the MIT License: |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
6 * http://www.opensource.org/licenses/mit-license.php |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
7 */ |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
8 ;(function($) { |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
9 var defaults = { |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
10 mouseOutOpacity: 0.67, |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
11 mouseOverOpacity: 1.0, |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
12 fadeSpeed: 'fast', |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
13 exemptionSelector: '.selected' |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
14 }; |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
15 |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
16 $.fn.opacityrollover = function(settings) { |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
17 // Initialize the effect |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
18 $.extend(this, defaults, settings); |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
19 |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
20 var config = this; |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
21 |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
22 function fadeTo(element, opacity) { |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
23 var $target = $(element); |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
24 |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
25 if (config.exemptionSelector) |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
26 $target = $target.not(config.exemptionSelector); |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
27 |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
28 $target.fadeTo(config.fadeSpeed, opacity); |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
29 } |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
30 |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
31 this.css('opacity', this.mouseOutOpacity) |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
32 .hover( |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
33 function () { |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
34 fadeTo(this, config.mouseOverOpacity); |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
35 }, |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
36 function () { |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
37 fadeTo(this, config.mouseOutOpacity); |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
38 }); |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
39 |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
40 return this; |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
41 }; |
|
967512924317
planemo upload for repository https://github.com/GReD-Clermont/sRNAPipe/ commit 410509088292be0687b8da3ea3bb75e72866a87d
brasset_jensen
parents:
diff
changeset
|
42 })(jQuery); |
