LEFT | RIGHT |
1 "use strict"; | 1 "use strict"; |
2 | 2 |
3 (function() | 3 (function() |
4 { | 4 { |
5 function init() | 5 function init() |
6 { | 6 { |
7 var manageButton = document.getElementById("manageExceptions"); | 7 var manageButton = document.getElementById("manageExceptions"); |
8 manageButton.addEventListener("click", toggleManage); | 8 manageButton.addEventListener("click", toggleManage, false); |
9 } | 9 } |
10 | 10 |
11 function toggleManage(ev) | 11 function toggleManage(ev) |
12 { | 12 { |
13 var exceptions = document.getElementById("exceptions"); | 13 var exceptions = document.getElementById("exceptions"); |
14 | 14 |
15 if (exceptions.getAttribute("class")) | 15 if (exceptions.getAttribute("class")) |
16 exceptions.removeAttribute("class"); | 16 exceptions.removeAttribute("class"); |
17 else | 17 else |
18 exceptions.setAttribute("class", "visible"); | 18 exceptions.setAttribute("class", "visible"); |
19 | 19 |
20 // IE6-only | 20 // IE6-only |
21 if (exceptions.getAttribute("className")) | 21 if (exceptions.getAttribute("className")) |
22 exceptions.removeAttribute("className"); | 22 exceptions.removeAttribute("className"); |
23 else | 23 else |
24 exceptions.setAttribute("className", "visible"); | 24 exceptions.setAttribute("className", "visible"); |
25 } | 25 } |
26 | 26 |
27 init(); | 27 init(); |
28 })(); | 28 })(); |
LEFT | RIGHT |