title: detect start of scroll event in macbook
body: <p>I have a scrollable div called 'divEventScroll'. When data is appended into this div using javascript/jquery, it is expected that the scroll bar stays at the same place i.e. scrollTop() remains the same. </p>
  
  <p>This functions perfectly as it should in iOS devices with iOS version 5 and lower. However, in iOS6+, as soon as a scroll is detected, the div scrolls right to the beginning of the div.</p>
  
  <p>I have fixed this issue (not in a really nice way), in the iPad3 with ios 6.0.1.</p>
  
  <p>However, it doesn't seem to work in the macbook, as it detects the scroll only after the scroll inertia event is triggered.</p>
  
  <p>This is the code I have used for the iPad: (it works)</p>
  
  <pre><code>$('body').on('touchmove',function(e){
       if(navigator.userAgent.match(/(iPad|Version\/6.0)/gi)){
         if($('#divEventScroll').has($(e.target)).length &amp;&amp; fromNextEvents){
            if($('#divEventScroll').scrollTop()&lt;scrollPos){
                     fromNextEvents=false;  
                         $('#divEventScroll').scrollTop(scrollPos);                
            }
          }
       }
  });
  </code></pre>
  
  <p>The code i have used for the Macbook Pro: (doesn't get triggered when i expect it to)</p>
  
  <pre><code>$('body').scroll(function(){
       if(navigator.userAgent.match(/(Macintosh&amp;Version\/6.0)/gi)){
           if(fromNextEvents){
               if($('#divEventScroll').scrollTop()&lt;scrollPos){
                   fromNextEvents=false;   
                   $('#divEventScroll').scrollTop(scrollPos);     
               }   
            }
        }
  });
  </code></pre>
  
  <p>Would really appreciate help on this one.</p>
  
  <p>EDIT: fromNextEvents will be set to true in the scenario where i want this code to work.</p>
  
  <p>EDIT2: I realize i wasn't too clear. (AT ALL! I had forgotten to add this):
  When i start scrolling down the div to view the content appended at the bottom, instead of scrolling down normally, the div shoots up right to the top, and then continues scrolling down from there. which is weird :S</p>