Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jindrichsirucek/3950a9bd4c487087d367f989b7f34f3b to your computer and use it in GitHub Desktop.
Save jindrichsirucek/3950a9bd4c487087d367f989b7f34f3b to your computer and use it in GitHub Desktop.
Toggle tabs html js jquery
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