title: Jquery stopped working on Chrome
body: <p>I implemented a bit of jquery which adds a class on elements when scrolling the page, so actually when the elements come into the viewport. I noticed that only on Chrome, the code just stopped working a couple of days ago. So is there something in the code that needs an update perhaps?</p>
  
  <pre><code>jQuery(document).ready(function(a){function m(){n()}function n(){a(document).height(),a(window).height();c?newScroll=a(window).scrollTop():"Safari"==o()||"Chrome"==o()?newScroll=a("body").scrollTop():newScroll=a("html,body").scrollTop(),e.each(function(){if(!a(this).hasClass("disabled")){var b=a(this);newScroll+1*a(window).height()&gt;a(this).offset().top?(b.removeClass("ontladen"),b.addClass("geladen")):newScroll+a(window).height()&lt;a(this).offset().top+1&amp;&amp;(b.addClass("ontladen"),b.removeClass("geladen"))}})}function o(){var a=navigator.userAgent.toLowerCase();return-1!=a.indexOf("opera")?"Opera":-1!=a.indexOf("staroffice")?"Star Office":-1!=a.indexOf("webtv")?"WebTV":-1!=a.indexOf("beonex")?"Beonex":-1!=a.indexOf("chimera")?"Chimera":-1!=a.indexOf("netpositive")?"NetPositive":-1!=a.indexOf("phoenix")?"Phoenix":-1!=a.indexOf("firefox")?"Firefox":-1!=a.indexOf("chrome")?"Chrome":-1!=a.indexOf("safari")?"Safari":-1!=a.indexOf("skipstone")?"SkipStone":-1!=a.indexOf("msie")?"Internet Explorer":-1!=a.indexOf("netscape")?"Netscape":-1!=a.indexOf("mozilla/5.0")?"Mozilla":-1!=a.indexOf("/")?"mozilla"!=a.substr(0,a.indexOf("/"))?navigator.userAgent.substr(0,a.indexOf("/")):"Netscape":-1!=a.indexOf(" ")?navigator.userAgent.substr(0,a.indexOf(" ")):navigator.userAgent}o();var c=!1;a("body").hasClass("layout-mobile")&amp;&amp;(c=!0);var d=a(".expl-wrapper"),e=a(".laad");a("html,body").stop().scrollTop(0),a(window).load(function(){m(),a("#loading-mask").fadeOut(950),setTimeout(function(){d.addClass("loaded"),m()},450)}).resize(function(){m()}).scroll(function(){n()})});
  </code></pre>