title: Typeerror: 'undefined' for select2 in grails gsp
body: <p>I am using <a href="http://ivaynberg.github.com/select2/#basics" rel="nofollow">select2</a>  for setting up fields used for tagging support for my application in my grails project.</p>
  
  <p>In html I have included </p>
  
  <pre><code> &lt;link rel="stylesheet" href="${resource(dir: 'css', file: 'select2.css')}"  type="text/css"&gt;
      &lt;script  type="text/javascript" src="../js/select2.js"&gt;&lt;/script&gt;
    &lt;div class="select2-container select2-container-multi populate placeholder" id="s2id_e2_2" style="width: 250px"&gt; 
       &lt;select id="e2_2" name="majorSkills" multiple="multiple" style="width: 250px; display: 'Select Major Skills'; " class="populate placeholder"&gt;&lt;option&gt;&lt;/option&gt;
              &lt;optgroup label="Java"&gt;
                  &lt;option value="j2ee"&gt;J2EE&lt;/option&gt;
                  &lt;option value="hibernate"&gt;Hibernate&lt;/option&gt;
                  &lt;option value="spring"&gt;Spring&lt;/option&gt;
  
              &lt;/optgroup&gt;
              &lt;optgroup label="ERP"&gt;
                  &lt;option value="sap"&gt;SAP&lt;/option&gt;
                  &lt;option value="peoplesoft"&gt;Peoplesoft&lt;/option&gt;
  
              &lt;/optgroup&gt;
  
          &lt;/select&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>In my script</p>
  
  <pre><code>$(document).ready(function () {
   $("#e2_2").select2({
                  placeholder: "Select a State"
              });
  });
  </code></pre>
  
  <p><strong>js and css files are included but and error shown up in console is</strong> </p>
  
  <pre><code>select2.js:33  ReferenceError: Can't find variable: jQuery
  
  TypeError: 'undefined' is not a function (evaluating '$("#e2_2").select2({
          placeholder: "Select a State"
      })')
  </code></pre>
  
  <p>Can anyone help me to fix these issues?</p>