| Index: static/js/main.js | 
| =================================================================== | 
| new file mode 100644 | 
| --- /dev/null | 
| +++ b/static/js/main.js | 
| @@ -0,0 +1,27 @@ | 
| +(function(){ | 
| + document.addEventListener("DOMContentLoaded", function() { | 
| + | 
| + // Change html class name from "no-js" to "js" | 
| + document.documentElement.className = "js"; | 
| + | 
| + // Custom Select | 
| + var customSelects = document.getElementsByClassName('custom-select-selected'); | 
| + function onClickCustomSelect(e) { | 
| + var options = e.target.nextElementSibling; | 
| + if (options.getAttribute("aria-hidden") == "true") | 
| + { | 
| + options.removeAttribute("aria-hidden"); | 
| + e.target.setAttribute("aria-expanded", "true"); | 
| + } | 
| + else | 
| + { | 
| + options.setAttribute("aria-hidden", "true"); | 
| + e.target.setAttribute("aria-expanded", "false"); | 
| + } | 
| + } | 
| + for (var i = 0; i < customSelects.length; i++) { | 
| + customSelects[i].addEventListener("click", onClickCustomSelect, false); | 
| + } | 
| + | 
| + }, false); | 
| +}()); |