I have some JS that I am not OK with. How can I reduce the amount of code?
(function ($) {
var allPanels = $('.accordion-modal > dd').hide();
$('.firstlink').addClass('green');
$('.firstlink > header').addClass('green');
$('.accordion-modal > .active-accordian').show();
$('.active-accordian').addClass('.active');
$('.accordion-modal > dt > a').click(function () {
$(this).children('header').addClass('green');
$(this).parent().siblings().children('a').children('header').removeClass('green'); //$(this).parent().siblings().children('a').removeClass('green');
allPanels.slideUp();
$(this).parent().next().slideDown();
return false;
});
})(jQuery);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<dl class="accordion-modal">
<dt><a href=""><header class='firstlink'>FIRST</header></a></dt>
<dd class="active-accordian">FIRST CONTENT</dd>
<dt><a href=""><header>SECOND</header></a></dt>
<dd>SECOND CONTENT</dd>
</dl>