title: codeigniter jquery not working
body: <p>I have included files in codeigniter webpage like this:  </p>
  
  <pre><code>&lt;link rel="stylesheet" type="text/css" href='&lt;?= base_url() ?&gt;css/unofficialchannels/style.css' /&gt;
  &lt;script type="text/javascript" src='&lt;?= base_url() ?&gt;js/jquery-1.8.2.min.js'&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src='&lt;?= base_url() ?&gt;js/jquery.tweetable.js'&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src='&lt;?= base_url() ?&gt;js/javascript.js'&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I have a function in javascript.js file like this:  </p>
  
  <pre><code>$(function () {
    alert('It works!');
  }); 
  </code></pre>
  
  <p>I also tried a function like this:  </p>
  
  <pre><code>$(document).ready(function(){
      alert('It works!');
  });
  </code></pre>
  
  <p>But it doesn't work, i don't get alert. Anybody has any ideas?</p>