hide/disaply button added
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
showTable('build', buildings);
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
showTable('build', buildings);
|
||||
let tableIsDisplayed = true;
|
||||
tableVisibilityButton.addEventListener("click",()=>{
|
||||
if(tableIsDisplayed){
|
||||
|
||||
}else{
|
||||
showTable('build', buildings);
|
||||
tableVisibilityButton.addEventListener("click", () => {
|
||||
if (tableIsDisplayed) {
|
||||
clearTable('build')
|
||||
tableVisibilityButton.innerHTML = "Показать таблицу";
|
||||
} else {
|
||||
showTable('build', buildings);
|
||||
tableVisibilityButton.innerHTML = "Скрыть таблицу";
|
||||
}
|
||||
|
||||
} )
|
||||
tableIsDisplayed = !tableIsDisplayed;
|
||||
})
|
||||
|
||||
})
|
||||
Reference in New Issue
Block a user