$('.tabs-nav a').on('click', function (event) { event.preventDefault(); $('.tabs-nav li').removeClass('tab-active'); $(this).parent().addClass('tab-active'); $('.tabs-stage section').hide(); $($(this).attr('href')).show(); if ($('#tab-1').css('display') == 'none') { $('.box-filters').hide(); } else { $('.box-filters').show(); } });