Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: static/js/main.js

Issue 29488555: Issue 5406 - Create Site Footer Component for Help Center (Closed)
Patch Set: Rebase Created Aug. 11, 2017, 4:08 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 (function(){
2 document.addEventListener("DOMContentLoaded", function() {
juliandoucette 2017/08/22 14:33:42 NIT: We are supposed to put brackets on the next l
ire 2017/09/04 20:28:06 Done.
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);
juliandoucette 2017/08/22 14:33:41 NIT: We could handle this event on the body instea
ire 2017/09/04 20:28:06 Agreed. I would like to change the way both this a
juliandoucette 2017/09/06 17:48:19 Acknowledged.
24 }
25
26 }, false);
27 }());
OLDNEW

Powered by Google App Engine
This is Rietveld