Skip to content

Instantly share code, notes, and snippets.

@PavelLaptev
Last active January 16, 2019 20:57
Show Gist options
  • Save PavelLaptev/d08affe334663f0f97c4def20136a0fa to your computer and use it in GitHub Desktop.
Save PavelLaptev/d08affe334663f0f97c4def20136a0fa to your computer and use it in GitHub Desktop.
document.addEventListener("DOMContentLoaded", function(e) {
slider.noUiSlider.on("update", function(values, handle) {
const allBuilding = [...document.querySelectorAll(".city-dot")];
allBuilding.map(i => {
i.style.display = "block";
});
[...range(1930, values[0]), ...range(values[1], 2019)].map(i => {
allBuilding.map(l => {
if (l.classList.contains(`${i}-jahr`)) {
l.style.display = "none";
}
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment