4 $("#annoy").each(function(i, annoy) {
6 var edition = "annoyed" + new Date().getFullYear();
10 localStorage.setItem("test", "test");
11 localStorage.removeItem("test");
12 have_localstorage = true;
14 have_localstorage = false;
17 $("#annoy-on").click(function(e) {
19 $(annoy).slideDown('fast');
21 if (have_localstorage) localStorage.removeItem(edition);
24 $("#annoy-off").click(function() {
25 $(annoy).slideUp('fast');
26 $("#annoy-on").show();
27 if (have_localstorage) localStorage[edition] = true;
30 if (have_localstorage) {
31 if (!localStorage[edition]) {
32 $("#annoy-on").hide();