-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Group button styling updated| added 3rd group content
- Loading branch information
Aliasger Rasheed
committed
Oct 31, 2019
1 parent
15cb7cf
commit 0337eb9
Showing
5 changed files
with
94 additions
and
43 deletions.
There are no files selected for viewing
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
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
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
// https://www.w3schools.com/howto/howto_js_tabs.asp | ||
|
||
function switchTab(evt, groupName) { | ||
console.log("function hit"+groupName); | ||
|
||
var i, tabcontent, tablinks; | ||
|
||
// Get all elements with class="tabcontent" and hide them | ||
tabcontent = document.getElementsByClassName("tab-content"); | ||
for (i = 0; i < tabcontent.length; i++) { | ||
tabcontent[i].style.display = "none"; | ||
} | ||
|
||
// Get all elements with class="tablinks" and remove the class "active" | ||
tablinks = document.getElementsByClassName("group-tab"); | ||
for (i = 0; i < tablinks.length; i++) { | ||
tablinks[i].className = tablinks[i].className.replace(" active", ""); | ||
tablinks[i].className = tablinks[i].className.replace(" active", ""); | ||
} | ||
|
||
// Show the current tab, and add an "active" class to the button that opened the tab | ||
document.getElementById(groupName).style.display = "block"; | ||
evt.currentTarget.className += " active"; | ||
} | ||
} | ||
document.getElementById("defGroup").click(); |