title: Console.log not working at all
body: <p>A bunch of code isn't working and I'm trying to identify where the problem lies but <code>console.log()</code> isn't logging any results in Chrome Dev tools, am I doing it correctly?</p>
  
  <pre><code>$(window).scroll(function() {
         $('section').each(function(){
              var id='#'+$(this).attr('id'),
                  off=$(id).offset().top,
                  hei=$(id).height(),
                  winscroll=$(window).scrollTop(),
                  dif=hei+off-($(window).height());
  
              if (winscroll &gt;= off &amp;&amp; winscroll&lt;=dif) {
                  console.log('first broken');
                  $(id+' .sticky').removeClass('abs').addClass('fix');
              } else if (winscroll &gt; dif){
                  console.log('second broken');
                  $(id+' .sticky').removeClass('fix').addClass('abs');
              } else {
                  console.log('third broken');
                  $(id+' .sticky').removeClass('fix abs');
              }   });
          });
  </code></pre>
  
  <p><strong>EDIT FULL CODE ADDED</strong></p>
  
  <pre><code>$(document).ready(function() {
  
      // If a browser supports 3D transforms use the fancy menu if it doesn't, use standard accordion menu instead
      if($('html').hasClass('csstransforms3d')){
  
          $( "#mp-menu" ).removeClass( "snap-drawers" ).addClass( "mp-menu" );
  
          $('nav ul li ul').css('border-bottom','1px solid rgba(255, 255, 255, .05)');
          $('nav ul li ul').css('background','none');
  
          // Insert elements where necessary to create the right structure
          $('#mp-menu').wrapInner('&lt;div class="mp-level" /&gt;');
          $('#mp-menu').find('li &gt; ul').wrap('&lt;div class="mp-level" /&gt;');
  
          $("#mp-menu ul li .mp-level").prepend(function () {
              return '&lt;span class="menu-title"&gt;' + $(this).prev().text() + '&lt;/span&gt; &lt;a class="ico mp-back" href="#"&gt;Back&lt;/a&gt;';
          });
  
          // load in necessary JS files
          $.getScript('http://176.32.230.2/baodev.com/cjo/wp-content/themes/CJO/js/multi-level-menu.js');
  
      } else {
  
          // load in necessary JS files
          $.getScript( "http://176.32.230.2/baodev.com/cjo/wp-content/themes/CJO/js/jquery.navgoco.min.js", function() {
              $("#demo1").navgoco({accordion: true});
          });
  
          $.getScript( "http://176.32.230.2/baodev.com/cjo/wp-content/themes/CJO/js/snap.min.js", function() {
  
              // Snapper settings     
              var snapper = new Snap({
                element: document.getElementById('scroller'),
                disable: 'right',
                maxPosition: 291
              });
  
              var addEvent = function addEvent(element, eventName, func) {
                  if (element.addEventListener) {
                  return element.addEventListener(eventName, func, false);
                } else if (element.attachEvent) {
                    return element.attachEvent("on" + eventName, func);
                }
              };
  
              // Toggle button
              addEvent(document.getElementById('trigger'), 'click', function(){
                  if( snapper.state().state=="left" ){
                      snapper.close();
                      $( ".menu-trigger" ).removeClass( "active" );
                  } else {
                      snapper.open('left');
                      $( ".menu-trigger" ).addClass( "active" );
                  }
              });
  
              addEvent(document.getElementById('scroller'), 'click', function(){
                  if( snapper.state().state=="left" ){
                      $( ".menu-trigger" ).removeClass( "active" );
                  }
              });
  
              /* Prevent Safari opening links when viewing as a Mobile App */
              (function (a, b, c) {
                if(c in b &amp;&amp; b[c]) {
                    var d, e = a.location,
                        f = /^(a|html)$/i;
                    a.addEventListener("click", function (a) {
                        d = a.target;
                        while(!f.test(d.nodeName)) d = d.parentNode;
                        "href" in d &amp;&amp; (d.href.indexOf("http") || ~d.href.indexOf(e.host)) &amp;&amp; (a.preventDefault(), e.href = d.href)
                    }, !1)
                }
              })(document, window.navigator, "standalone");
  
          });
  
      } // end if
  
      fitHeight();
  
      $(window).scroll(function() {
          $('section').each(function(){
              var id='#'+$(this).attr('id'),
                  off=$(id).offset().top,
                  hei=$(id).height(),
                  winscroll=$(window).scrollTop(),
                  dif=hei+off-($(window).height());
  
             console.log('msj');
  
              if (winscroll &gt;= off &amp;&amp; winscroll&lt;=dif) {
                  $(id+' .sticky').removeClass('abs').addClass('fix');
              } else if (winscroll &gt; dif){
                  $(id+' .sticky').removeClass('fix').addClass('abs');
              } else {
                  $(id+' .sticky').removeClass('fix abs');
              }
          });
       });
  
  });
  
  // Trigger FitHeight on browser resize
  $(window).resize(fitHeight);
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>Some bits of the full code (above) refer to other JS files and code returns no errors when run with these files present. After troubleshooting I see the console message before the scroll function but I do not see the console message within the scroll function.</p>
  
  <pre><code>fitHeight();
  
      console.log('About to bind scroll effects'); // I SEE THIS MESSAGE
  
      $(window).scroll(function() {
  
          console.log("scroll bound, now loop through sections"); //BUT NOT THIS ONE
  
          $('section').each(function(){
  </code></pre>