$('.search').click(function(){ $('.search-bar').toggleClass('form_active'); $('.search-bar input[type="submit"]').toggleClass('visible'); });