X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/60817334eba7db4b2b45e640fe91f8dc157efc47..e304ddc63e67fcf4176145e5405abdc0ff7ddd0b:/apps/wolnelektury_core/static/js/annoy.js diff --git a/apps/wolnelektury_core/static/js/annoy.js b/apps/wolnelektury_core/static/js/annoy.js new file mode 100755 index 000000000..3104097a9 --- /dev/null +++ b/apps/wolnelektury_core/static/js/annoy.js @@ -0,0 +1,29 @@ +(function($) { + $(function() { + + +$("#annoy-on").click(function(e) { + e.preventDefault(); + $("#annoy").slideDown('fast'); + $(this).hide(); + if (Modernizr.localstorage) localStorage.removeItem("annoyed2013"); +}); + +$("#annoy-off").click(function() { + $("#annoy").slideUp('fast'); + $("#annoy-on").show(); + if (Modernizr.localstorage) localStorage["annoyed2013"] = true; +}); + + +if (Modernizr.localstorage) { + if (!localStorage["annoyed2013"]) { + $("#annoy-on").hide(); + $("#annoy").show(); + } +} + + + + }); +})(jQuery);