title: CodeIgniter and Javascript/Jquery Library
body: <p>As title said, I'm trying to figure out how to use javascript and jquery libraries on CI. </p>
  
  <p>Following instruction in <a href="http://codeigniter.com/user_guide/libraries/javascript.html">the docs</a>, I load the library in my controller:</p>
  
  <pre><code>$this-&gt;load-&gt;library('javascript');
  </code></pre>
  
  <p>Then, I define the location of the jQuery file (jquery.min.js) in the config.php:</p>
  
  <pre><code>$config['javascript_location'] = 'http://localhost/ci/assets/js/jquery/');
  </code></pre>
  
  <p>After that, I open the view file and put in these two lines:</p>
  
  <pre><code>&lt;?php echo $library_src;?&gt;
  &lt;?php echo $script_head;?&gt; 
  </code></pre>
  
  <p>First error comes up here: <strong>Undefined variable $library_src and $script_head</strong> (don't understand where I have to set them)</p>
  
  <p>Anyway, I've commented these lines and continue with jquery lib, by loading it in my controller with:</p>
  
  <pre><code>$this-&gt;load-&gt;library('jquery');
  </code></pre>
  
  <p>Next error: <strong>Unable to load the requested class: jquery</strong>. (it seems that it can't find the lib, what i messed up?)</p>
  
  <p>Checking on system folder it looks all files are in place:</p>
  
  <pre><code>system/libraries/Javascript.php
  system/libraries/javascript/Jquery.php
  </code></pre>
  
  <p>Thanks in advance for your help!</p>