Hi, I’m currently building some tabs in a template, and I’ve done that with jQuery. The codes that I’m currently using for showing the tabs content is: $(document).ready(function(){ $(â€.emailâ€).click(function(){ $(â€.emailformâ€).toggle(“fastâ€); $(this).toggleClass(“activeâ€); return false; }); }); Code (markup): AND FOR THE SECOND TAB IS : $(document).ready(function(){ $(â€.portfolioâ€).click(function(){ $(â€.portfoliocontentâ€).toggle(“fastâ€); $(this).toggleClass(“activeâ€); return false; }); }); Code (markup): The problem is, if you open the first tab, and then you click the second one, the first one doesn’t close. I looking for some help that will make an opened tab closes once the other one opens. Thanks in advance
$(document).ready(function(){ $(â€.emailâ€).click(function(){ $(â€.emailformâ€).toggle(“fastâ€); $(this).toggleClass(“activeâ€); $(".portfolio").toggleClass(“deactiveâ€); return false; }); }); $(document).ready(function(){ $(â€.portfolioâ€).click(function(){ $(â€.portfoliocontentâ€).toggle(“fastâ€); $(this).toggleClass(“activeâ€); $(".email").toggleClass(“deactiveâ€); return false; }); });