Created
January 14, 2018 23:52
-
-
Save jindrichsirucek/3950a9bd4c487087d367f989b7f34f3b to your computer and use it in GitHub Desktop.
Toggle tabs html js jquery
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
function toggleTabs() | |
{ if(jQuery(".seminarInfoCestaHrdiny").toggleClass("selectedTab").hasClass("selectedTab")) | |
jQuery(".seminarInfoCestaHrdiny").closest(".row").show(); | |
else | |
jQuery(".seminarInfoCestaHrdiny").closest(".row").hide(); | |
if(jQuery(".seminarInfoProfil").toggleClass("selectedTab").hasClass("selectedTab")) | |
jQuery(".seminarInfoProfil").closest(".row").show(); | |
else | |
jQuery(".seminarInfoProfil").closest(".row").hide(); | |
jQuery(".tabProfil .ve_content_block").css("background-color",jQuery(".tabProfil").toggleClass("selectedTab").hasClass("selectedTab")?"#e8e8e8":"white") | |
jQuery(".tabCestaHrdiny .ve_content_block").css("background-color",jQuery(".tabCestaHrdiny").toggleClass("selectedTab").hasClass("selectedTab")?"#e8e8e8":"white") | |
event.preventDefault(); | |
} | |
jQuery(document).ready(function() { | |
if(!jQuery(".seminarInfoCestaHrdiny").hasClass("selectedTab")) | |
jQuery(".seminarInfoCestaHrdiny").closest(".row").hide(); | |
if(!jQuery(".seminarInfoProfil").hasClass("selectedTab")) | |
jQuery(".seminarInfoProfil").closest(".row").hide(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment