title: Vuejs - When should jquery plugins be initialised
body: <p>I have some JQuery plugins that need initialising, normally this could be done using <code>$(document).ready(function () { })</code> but this doesn't appear to work when doing it within a vue components <code>created</code> event. With this in mind, I've made use of <code>this.$nextTick(function () { })</code> but this doesn't seem to work with elements that are introduced on child component. For instance, I do this:</p>
  
  <pre><code>created: function () {
    this.$nextTick(function () {
      window.materialadmin.AppOffcanvas.initialize()
    })
  }
  </code></pre>
  
  <p>I have a button which is introduced in a child component but the onclick handler this above code attaches doesn't trigger. If I do:</p>
  
  <pre><code>setTimeout(function () {
      window.materialadmin.AppOffcanvas.initialize()
  }, 1000)
  </code></pre>
  
  <p>Then my click handler will be bound and work.</p>
  
  <p>At what point is the correct point to bind my events so that I don't need to rely on <code>setTimeout</code> which is hacky?</p>