title: Animate Body scroll issue
body: <p>In my website i will have a right and left panel. Right panel contains all the links and Left panel contains all the videos.When user clicked on a link i have to animate the body scroll with smooth animation and need to highlight the particular video background by applying new class name and while scrolling need to remove the class name(new class name).Here my issue is some delay while applying animation effect while adding the new class name.can anyone help us to resovle this issue. 
  Here im attaching the code.Please check.</p>
  
  <pre><code>jQuery(document).ready(function(){  
      jQuery('.sub-cat-list a[href*="#"]').click(function (e){    
          e.preventDefault();
          var clickURL = jQuery(this).attr('href'); 
          var target = this.hash; 
          var offTop =  parseInt(jQuery(target).offset().top);
          var scroLtoP = parseInt(jQuery(window).scrollTop());
  
          if (typeof(jQuery(target).offset()) != 'undefined') { 
              jQuery( "html, body" ).animate({
                  scrollTop: offTop 
               },800).promise().done(function(even) { 
                  jQuery(target).parent().addClass('focusin');
                  setTimeout(function(){                      
                      removeFocClass(target); 
                  },900);
              });         
          }
      });
  
  function removeFocClass(curEle)
  {
      var menuTargetFC = jQuery(curEle).parent().hasClass('focusin');     
      if(menuTargetFC)
      {       
          jQuery(window).scroll(function(){           
              jQuery(curEle).parent().removeClass('focusin');         
          });     
      }   
      else{
          jQuery(curEle).parent().addClass('focusin');        
      }       
  }
  });
  </code></pre>