title: Does JIRA have a method to call JQuery(window).ready?
body: <p>We have a Jura plugin written by ourselves, and in it's vm template at the very end there's the following code:</p>
  
  <pre><code>AJS.$(window).ready(function(){
      doSomeThing();
  });
  </code></pre>
  
  <p>Inside of this method we are loading some server side data and initializing internal js objects. For some strange reason this specific method doSomeThing is being called twice. Moreover, vm template is also being called twice, owerwriting first template initialization state (but template may be already initialized and contain some data at this point). I don't get it why it's made this way and how to work around this. If someone faced similar thing before and knows what to deal with it - please respond. Much appreciated.</p>