title: How to add css style if user scroll page over 112px
body: <p>I would like to know how is possible to assign a css rule to an element only if current scroll position is greater than 112px..</p>
  
  <p>I've tried this but it doesn't work:</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
  $window.scrollTop(function(){ 
  
  var a = 112;
  var pos = $window.scrollTop();
  if(pos &gt; a) {
      $("menu").css({
                  position: 'fixed'
              });
  }
  else {
      $("menu").css({
                  position: 'absolute',
                  top:'600px'
              });
  }
  });
  &lt;/script&gt;
  </code></pre>