OLD | NEW |
(Empty) | |
| 1 (function(){ |
| 2 document.addEventListener("DOMContentLoaded", function() { |
| 3 |
| 4 // Change html class name from "no-js" to "js" |
| 5 document.documentElement.className = "js"; |
| 6 |
| 7 // Custom Select |
| 8 var customSelects = document.getElementsByClassName('custom-select-selected'
); |
| 9 function onClickCustomSelect(e) { |
| 10 var options = e.target.nextElementSibling; |
| 11 if (options.getAttribute("aria-hidden") == "true") |
| 12 { |
| 13 options.removeAttribute("aria-hidden"); |
| 14 e.target.setAttribute("aria-expanded", "true"); |
| 15 } |
| 16 else |
| 17 { |
| 18 options.setAttribute("aria-hidden", "true"); |
| 19 e.target.setAttribute("aria-expanded", "false"); |
| 20 } |
| 21 } |
| 22 for (var i = 0; i < customSelects.length; i++) { |
| 23 customSelects[i].addEventListener("click", onClickCustomSelect, false); |
| 24 } |
| 25 |
| 26 }, false); |
| 27 }()); |
OLD | NEW |