title: console.log not working when in $(document).ready(function()
body: <p>Haven't been working with jQuery for a long time. Now, with a fresh new project, I have a somehow strange behaviour.</p>
  
  <p>The scripts are loaded in the correct order:</p>
  
  <pre><code>&lt;script type='text/javascript' src='http://example.com/wp-includes/js/jquery/jquery.js?ver=1.12.4'&gt;&lt;/script&gt;
  some other scripts...
  
  &lt;script type='text/javascript' src='http://example.com/wp-content/themes/mytheme/myscript.js?ver=4.9.7'&gt;&lt;/script&gt;
  </code></pre>
  
  <p><code>myscript.js</code></p>
  
  <pre><code>(function ($) {
      console.log('logA');
      console.log($.fn.jquery);
      $(document).ready(function(){
          console.log('logB');
          console.log($.fn.jquery);
      });
  })(jQuery);
  </code></pre>
  
  <p>With this code, I'd expect two log outputs:</p>
  
  <p><code>logA</code>
  <code>1.12.4</code></p>
  
  <p><code>logB</code>
  <code>1.12.4</code></p>
  
  <p>But instead I only get <code>logA</code> <code>1.12.4</code> as output.</p>
  
  <p><code>logB</code> is not shown in the console, although I can access DOM-elements with <code>$('#elem, .elem2')</code>.</p>
  
  <p>What's wrong here?</p>
  
  <p>I also tried without the anonymous function, which gives me an error <code>$ is not a function</code></p>
  
  <pre><code> $(document).ready(function(){
        console.log('logB');
   });
  </code></pre>
  
  <p>jQuery-version: 1.12.4</p>