title: Why is the jquery script not working?
body: <p>Why is the jQuery script working in my jsfiddle but not in my page?</p>
  <p>What I've done: Tried different versions of JQuery...made the script</p>
  <p>So I have this test page:</p>
  <h2>Head Part</h2>
  <pre><code>   &lt;!-- Scripts --&gt;
          &lt;script src=&quot;//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js&quot;&gt;&lt;/script&gt;
          &lt;script src=&quot;//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js&quot;&gt;&lt;/script&gt;
             &lt;style&gt;
  
              select #canselect_code {
                  width:200px;
                  height:200px;
              }
              .fr {
                  float:right;
              }
              .fl {
                  float:left;
              }
  
  
          &lt;/style&gt;
  
          &lt;script&gt;
  $(document).ready(function(){
              $('[id^=\&quot;btnRight\&quot;]').click(function (e) {
      
      $(this).prev('select').find('option:selected').remove().appendTo('#isselect_code');
      
  });
  
  $('[id^=\&quot;btnLeft\&quot;]').click(function (e) {
  
      $(this).next('select').find('option:selected').remove().appendTo('#canselect_code');
  
  });
  
  });
          &lt;/script&gt;
         
  
  &lt;/head&gt;
  </code></pre>
  <h2>Body Part</h2>
  <pre><code> &lt;div&gt;
      &lt;select id='canselect_code' name='canselect_code' multiple class='fl'&gt;
          &lt;option value='1'&gt;toto&lt;/option&gt;
          &lt;option value='2'&gt;titi&lt;/option&gt;
      &lt;/select&gt;
      &lt;input type='button' id='btnRight_code' value='  &gt;  ' /&gt;
      &lt;br&gt;
      &lt;input type='button' id='btnLeft_code' value='  &lt;  ' /&gt;
      &lt;select id='isselect_code' name='isselect_code' multiple class='fr'&gt;
          &lt;option value='3'&gt;tata&lt;/option&gt;
          &lt;option value='4'&gt;tutu&lt;/option&gt;
      &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  <p><a href="http://jsfiddle.net/7785m/" rel="noreferrer">JSFIDDLE HERE</a></p>
  <p>Now my question is: Why is the code working in JsFiddle but not in my document?</p>
  <p>Thanks for your answers!</p>
  <p>EDIT: Added document ready function..still does not work!</p>