title: JS Dynamic Link to point to root / in CI
body: <p>I have setup my CI in a sub directory under my apache /localhost/ci_app/</p>
  
  <p>Now I have some JS file under /localhost/ci_app/assets/js/code.js</p>
  
  <p>Inside code.js I load a script dynamically </p>
  
  <pre><code>(function(d, s, id){
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) {return;}
      js = d.createElement(s); js.id = id;
      js.src = "/assets/js/another_script.js";
      fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'my_other_script'));
  </code></pre>
  
  <p>In CI config I have <code>$config['base_url'] = '/ci_app/';</code> but everytime I load the page I get the script calling <code>http://localhost/assets/js/another_script.js</code>. </p>
  
  <p>I need the script to be pointing to <code>http://localhost/ci_app/assets/js/another_script.js</code> </p>