title: jQuery how to queue fadeIn and fadeOut
body: <p>I have two different events that call fadeIn / fadeOut on a div.  In some cases, the element could be the same.</p>
  
  <pre><code>&lt;div class="details"&gt;Details&lt;/div&gt;
  &lt;div class="details"&gt;Details2&lt;/div&gt;
  
  swiper.on('TouchStart', function () {
      $(".details:eq(" + swiper.previousIndex + ")").fadeOut({queue:true});
  });
  swiper.on('TouchEnd', function () {
      $(".details:eq(" + swiper.activeIndex + ")").fadeIn({queue: true});
  });
  </code></pre>
  
  <p>I need the effect to wait if (and only if) the other is still running.</p>