Unknown
7 years ago
4 changed files with 81 additions and 4 deletions
@ -0,0 +1,17 @@ |
|||
$( document ).ready(function() { |
|||
|
|||
var acc = document.getElementsByClassName("sanfona"); |
|||
var i; |
|||
|
|||
for (i = 0; i < acc.length; i++) { |
|||
acc[i].addEventListener("click", function() { |
|||
this.classList.toggle("active-sanfona"); |
|||
var painel = this.nextElementSibling; |
|||
if (painel.style.display === "block") { |
|||
painel.style.display = "none"; |
|||
} else { |
|||
painel.style.display = "block"; |
|||
} |
|||
}); |
|||
} |
|||
}); |
@ -0,0 +1,13 @@ |
|||
function openCity(evt, tabId) { |
|||
var i, tabcontent, tablinks; |
|||
tabcontent = document.getElementsByClassName("tabcontent"); |
|||
for (i = 0; i < tabcontent.length; i++) { |
|||
tabcontent[i].style.display = "none"; |
|||
} |
|||
tablinks = document.getElementsByClassName("tablinks"); |
|||
for (i = 0; i < tablinks.length; i++) { |
|||
tablinks[i].className = tablinks[i].className.replace(" active", ""); |
|||
} |
|||
document.getElementById(tabId).style.display = "block"; |
|||
evt.currentTarget.className += " active"; |
|||
} |
@ -0,0 +1,37 @@ |
|||
/* Style the tab */ |
|||
.tab { |
|||
overflow: hidden; |
|||
border: 1px solid #ccc; |
|||
background-color: #00305b; |
|||
} |
|||
|
|||
/* Style the buttons inside the tab */ |
|||
.tab button { |
|||
background-color: inherit; |
|||
float: left; |
|||
border: none; |
|||
outline: none; |
|||
cursor: pointer; |
|||
padding: 14px 16px; |
|||
transition: 0.3s; |
|||
font-size: 17px; |
|||
color: #d2d2d2; |
|||
} |
|||
|
|||
/* Change background color of buttons on hover */ |
|||
.tab button:hover { |
|||
background-color: #ddd; |
|||
} |
|||
|
|||
/* Create an active/current tablink class */ |
|||
.tab button.active { |
|||
background-color: #024277; |
|||
} |
|||
|
|||
/* Style the tab content */ |
|||
.tabcontent { |
|||
display: none; |
|||
padding: 6px 12px; |
|||
border: 1px solid #ccc; |
|||
border-top: none; |
|||
} |
Loading…
Reference in new issue