title: How To Convert A className Into An ID in jQuery
body: <p>In my example I have a basic tabbed content setup. The buttons have classes that match the divs IDs. onClick, I'd like to grab the className, and find an ID with the same name</p>
  
  <p><a href="https://i.stack.imgur.com/2jCkV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2jCkV.png" alt="enter image description here"></a></p>
  
  <p><strong>jQuery:</strong></p>
  
  <pre><code>$("li").click(function() {
     var liClass = this.className;
     $("li").removeClass("active");
     $("#"+liClass).addClass("active"); 
  });
  </code></pre>
  
  <p><strong>jsFiddle:</strong> <a href="https://jsfiddle.net/CSS_Apprentice/kpo7t6xh/" rel="nofollow noreferrer">https://jsfiddle.net/CSS_Apprentice/kpo7t6xh/</a></p>