title: Remove elements with the same class
body: <p>I have dynamically built tabs. When you add a tab you give it a class (which is equal to the name you give to the tab), the same class is added to the tab's description, which appears beneath the default description field.</p>
  
  <p>The problem is when I remove a tab I search through <code>&lt;li&gt;</code> elements and check whether they have a certain class, if they have, so they get removed. But naturally only tab itself gets removed, but not its description although the description also has the same class like the tab.
  Here's the <a href="https://jsfiddle.net/a3ttzqua/" rel="nofollow">fiddle</a>.</p>
  
  <p>My code which answerable for removing tabs and description is on lines 59-66 in the JavaScript section (pasted beneath).</p>
  
  <pre><code>         /*********Remove a tab******/
          $( ".close" ).click( function(){
  
              $( this ).closest( "li" ).fadeOut( 200, function() {$( this ).remove();});
              $thisClass = $ ( this ).closest( "li" ).attr( "class" );
              alert ( $thisClass );
              $( "li" ).hasClass( $thisClass ).remove();
  
          });
  </code></pre>