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

Unified Diff: static/js/main.js

Issue 29485575: Issue 5385 - Create Site Header Component for Help Center (Closed)
Patch Set: Fix svgs, Implement search, Show searchbar for no-js Created July 17, 2017, 9:24 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: static/js/main.js
===================================================================
new file mode 100644
--- /dev/null
+++ b/static/js/main.js
@@ -0,0 +1,13 @@
+(function(){
+ document.addEventListener("DOMContentLoaded", function()
+ {
+
+ // Change html class name from "no-js" to "js"
+ document.documentElement.className = "js";
+
+ document.getElementById('toggle-searchform').addEventListener('click', function(e) {
+ e.preventDefault();
+ document.getElementById('site-search').classList.toggle('open');
+ }, false);
+ }, false);
+}());

Powered by Google App Engine
This is Rietveld