Push REPO Site
This commit is contained in:
31
repo-reloaded/js/locations.js
Normal file
31
repo-reloaded/js/locations.js
Normal file
@@ -0,0 +1,31 @@
|
||||
const europeButton = document.getElementById("eu-button");
|
||||
const usButton = document.getElementById("us-button");
|
||||
|
||||
const europeSection = document.getElementById("eu")
|
||||
const usSection = document.getElementById("us")
|
||||
|
||||
europeButton.onclick = ev => {
|
||||
if (!europeButton.classList.contains("bg-gray-700"))
|
||||
europeButton.classList.add("bg-gray-700");
|
||||
|
||||
if (usButton.classList.contains("bg-gray-700"))
|
||||
usButton.classList.remove("bg-gray-700")
|
||||
|
||||
if (europeSection.classList.contains("hidden")) {
|
||||
europeSection.classList.remove("hidden")
|
||||
usSection.classList.add("hidden")
|
||||
}
|
||||
};
|
||||
|
||||
usButton.onclick = ev => {
|
||||
if (!usButton.classList.contains("bg-gray-700"))
|
||||
usButton.classList.add("bg-gray-700")
|
||||
|
||||
if (europeButton.classList.contains("bg-gray-700"))
|
||||
europeButton.classList.remove("bg-gray-700");
|
||||
|
||||
if (usSection.classList.contains("hidden")) {
|
||||
europeSection.classList.add("hidden")
|
||||
usSection.classList.remove("hidden")
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user