title: jQuery scrollTop() executes multiple times
body: <p>I have a code like below in my Javascript (jQuery) file:</p>
  
  <pre><code>jQuery(document).on('scroll', function() {
      var scrollTop = jQuery(document).scrollTop();
      console.log(scrollTop);
      if(scrollTop &lt; 350) {
          jQuery('.header__top').removeClass('header-fixed');
          jQuery('.logo').css({position: "absolute", height: "auto"});
          jQuery('.logo img').css("height", "auto");
      }else {
          jQuery('.header__top').addClass('header-fixed');
          jQuery('.logo').css({position: "static", height: "85px"});
          jQuery('.logo img').css("height", "100%");
      }
  });
  </code></pre>
  
  <p>And when I scroll 3 times in my browser something strange happens. Function fires multiple times (infinite). Then when I scroll top or down it works fine. Why is my scroll function causing infinite executes in a specyfic place?</p>