title: Add active class to an element onclick just for the duration of click using jquery
body: <p>I'm trying to add active class to an element when someone clicks on it and then auto remove it immediately.</p>
  
  <p>I've already tried with below methods but no luck yet -</p>
  
  <p>Method - 1</p>
  
  <pre><code>setTimeout(function() {
      $('.classname').on('click', function() {
          $('.classname').addClass('active');
      }, 1000);
  });
  </code></pre>
  
  <p>Method - 2</p>
  
  <pre><code>$('.classname').on('click', function() {
      $( ".classname" ).switchClass( "active", "no-active", 1000 );
  });
  </code></pre>