Created
October 20, 2017 19:25
-
-
Save dfrho/87a4d145b3a69bfacbbf891aeacb36ae to your computer and use it in GitHub Desktop.
prepNavPanel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function prepNavPanel() { | |
var boroIDs = ["mh", "bk", "qs", "xb", "si", "all"]; | |
boroIDs.forEach(function (boroID) { | |
let buttonEl = document.getElementById(boroID); | |
let id = buttonEl.id; | |
buttonEl.onclick = | |
id !== "all" | |
? function (e) { | |
e.preventDefault(); | |
filterLocationList(id); | |
setBoroView(id); | |
} | |
: function (e) { | |
e.preventDefault(); | |
resetLocationList(); | |
setBoroView("all"); | |
}; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment