title: Magento: how to automatically add JS file after certain other JS files?
body: <p>I need to include a JavaScript file after certain other JavaScript files. Normally, I would just include it in the XML file using syntax like:</p>
  
  <pre><code>&lt;action method="addJs"&gt;&lt;script&gt;myfile.js&lt;/script&gt;&lt;/action&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;action method="addItem"&gt;&lt;type&gt;js&lt;/type&gt;&lt;name&gt;myfile.js&lt;/name&gt;&lt;/action&gt;
  </code></pre>
  
  <p>in the correct order, so files are included the way I want.</p>
  
  <p>The point is, though, I won't know how many times I have to include my file. To be more specyfic, I'm trying to include a file with jQuery.noConflict() after every instance of jquery*.js file. The website I'm working on is still under development and there might still be added some new extensions that include their own jquery library (and I might not even be aware of that as I am not the only person working on the project). </p>
  
  <p>Is there any event on including js file when rendering the layout on the frontend or maybe there is some method I could rewrite to achieve the desired effect?</p>