title: Jquery make a div stop scroll on certain height
body: <p>Im trying to make it so that the servicewrapper div only scrolls to a certain height and stops there. And you cant scroll more on the page.</p>
  
  <p>I started with this code:</p>
  
  <pre><code>$(window).scroll(function() {   
   if ($(window).scrollTop() &gt;=380) 
  { 
      $(window).scrollTop(380); 
  }
  });
  </code></pre>
  
  <p>It did the trick until i noticed that it stops all scrolling on all pages at the height.
  So I tried wit this code so that the rule only applied to the servicewrapper div but with no luck. As you can see im no expert in jquery hehe.</p>
  
  <pre><code>$(window).scroll(function() {
   if $('#servicewrapper').scrollTop() &gt;=380) 
  { 
      $('#servicewrapper').scrollTop(380); 
  }
  });
  </code></pre>
  
  <p>Is there a way to do this? Been searching on google and on stack for a answear on this but I havent found any, at least not as how I want it to be and Im too much of a noob to alter someone elses code.</p>
  
  <p>Thanks in advanced!</p>