simple jQuery smooth scrolling block

2014-03-06T07:01:00.000-08:00

jQuery(document).ready(function() {
  var $scrollingDiv = jQuery("#SELECTOR");
                var $topStop = 300;//place here the height of your header
                var $bottomStop = 2600;// place here where your footer starts
  jQuery(window).scroll(function(){
                         var top = jQuery(window).scrollTop();
                          if(top > $topStop && top < $bottomStop)
                                {
                 $scrollingDiv
    .stop()
    .animate({"marginTop": (top - $topStop) + "px"}, "slow" );
                                }
                         else
                                {
                                if(top < $topStop)
                                     {
                                     $scrollingDiv
             .stop()
             .animate({"marginTop": "0px"}, "slow" );
                                     }
                                }
  });
 });

a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a h. mah... comic should stop around here...... d r o p p e d m y c o o k i e!!!