title: offset().top not working in Safari
body: <p>Having problem offset().top not working in Safari. Works fine on all other browsers but seems to break in Safari. Any suggestions?</p>
  
  <pre><code>    $(window).scroll(function(){
          collapseNav();
      });
  
      function collapseNav() { 
          if ($(".navbar").offset().top &gt; 50 ) {
              // code here
          } else {
              // code here
          }
      }
  </code></pre>