Optimizing jQuery/JS Switch Statement I am trying to optimize the following switch statement, but I'm having a brain fart about how to do it. Here's the code:

$('.newsroom-tabs div.pane-content ul li').click(function(){
// get the class name of the clicked link
var className = $(this).attr('class');
// variable so that jQuery isn't traversing the DOM each time
var hideFeaturedArticle = $('.featured-article').hide();
// based on the category selected, the featured article will
// show for that section
switch(className) {
    case 'air-quality-news-tab':
        hideFeaturedArticle;
        $('.featured-article.aqn').fadeIn(300);
        break;
    case 'awards-and-reviews-tab':
        hideFeaturedArticle;
        $('.featured-article.aar').fadeIn(300);
        break;
    case 'in-the-community-tab':
        hideFeaturedArticle;
        $('.featured-article.itc').fadeIn(300);
        break;
    case 'press-releases-tab':
        hideFeaturedArticle;
        $('.featured-article.pr').fadeIn(300);
        break;
    default:
        return className;

}
});


I feel like hiding the tabs each time is inefficient, but I'm not sure how to do this otherwise. Is there anything else I could do better here?
I notice that the elements you show have classes namesd after the elements you click. 

For example:


The element with the class air-quality-news-tab
Will show the elements matching selector ".featured-article .aqn"


If this will always be the case, you could just reduce the clicked class down to the initials and use that to select the appropriate element like this:

(note that someone better at regex than me could probably make this even shorter)



$('.newsroom-tabs div.pane-content ul li').click(function() {
  var className = $.map($(this).attr('class').split('-'), function(val) {
    return val.match(/^[a-z]/i);
  }).join('').replace(/t$/i, '');
  $('.featured-article').hide();
  $('.featured-article.' + className).fadeIn(300);
});
.featured-article {
  display: none;
  width: 300px;
  height: 200px;
  background-color: #cccccc;
}
&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;div class="newsroom-tabs"&gt;
  &lt;div class="pane-content"&gt;
    &lt;ul&gt;
      &lt;li class="air-quality-news-tab"&gt;air-quality-news-tab&lt;/li&gt;
      &lt;li class="awards-and-reviews-tab"&gt;awards-and-reviews-tab&lt;/li&gt;
      &lt;li class="in-the-community-tab"&gt;in-the-community-tab&lt;/li&gt;
      &lt;li class="press-releases-tab"&gt;press-releases-tab&lt;/li&gt;

    &lt;/ul&gt;

  &lt;/div&gt;
&lt;/div&gt;

&lt;div class="featured-article aqn"&gt;aqn&lt;/div&gt;
&lt;div class="featured-article aar"&gt;aar&lt;/div&gt;
&lt;div class="featured-article itc"&gt;aqn&lt;/div&gt;
&lt;div class="featured-article pr"&gt;pr&lt;/div&gt;