title: JavaScript .scroll function not working
body: <p>I have been trying for hours now but couldn't find a reason why the following code is not working on my site (<a href="http://robo.im" rel="nofollow">http://robo.im</a>) -</p>
  
  <pre><code>    &lt;script&gt;
      $(window).scroll(function () {
          if ($(window).scrollTop() &gt; 400) { 
              $('.home #masthead').css("opacity", 0.98);
          }
          else{
              $('.home #masthead').css("opacity", 0);
          }
      });
      &lt;/script&gt;
  </code></pre>
  
  <p>I'm calling it in the footer with 'script' tags and have included all the necessary files. Kindly help and take a look into the page source if required.</p>