Annoy
[wolnelektury.git] / src / wolnelektury / static / js / annoy.js
1 (function($) {
2     $(function() {
3
4 var tag = "annoyed2019wspieraj";
5
6 $("#annoy-on").click(function(e) {
7     e.preventDefault();
8     $("#annoy").slideDown('fast');
9     $(this).hide();
10     if (Modernizr.localstorage) localStorage.removeItem(tag);
11 });
12
13 $("#annoy-off").click(function() {
14     $("#annoy").slideUp('fast');
15     $("#annoy-on").show();
16     if (Modernizr.localstorage) localStorage[tag] = true;
17 });
18
19
20 if (Modernizr.localstorage) {
21     if (!localStorage[tag]) {
22         $("#annoy-on").hide();
23         $("#annoy").show();
24     }
25 }
26
27
28
29     });
30 })(jQuery);