title: Jquery Multiple document ready and class
body: <p>Why this does not work ? According to <a href="https://stackoverflow.com/questions/8743599/jquery-document-ready-multiple-allowed">JQuery Document Ready - Multiple allowed?</a>  it should. It throws a "jQuery.Deferred exception: Dog is not defined ReferenceError: Dog is not defined"</p>
  
  <pre><code>$(function() {
    class Dog {
      constructor() {
      }
      bark(){
          console.log('bark')
      }
  }
  })
  
  
  $(function() {
    var teckel = new Dog()
    teckel.bark()
  })
  </code></pre>