title: Javascript disabled when i load this file
body: <p>i have a problem in my Symfony2.4 project .i have 2 selects and 2 radiobuttons 
  i want to disable the first  and make second  enabled on each click here is my code </p>
  
  <pre><code>&lt;div class="row"&gt;
                        &lt;div class="col-lg-3 col-md-3 ui-sortable"&gt;
                          &lt;span class="ui-spinner ui-widget ui-widget-content ui-corner-all"&gt;
                          &lt;input type="radio" name="group1" value="mensuelle" checked="checked"style="opacity: 1!important;" /&gt; Mensuelle   
                          &lt;/span&gt;
                          &lt;/div&gt;
                        &lt;div class="col-lg-3 col-md-7 ui-sortable"&gt;
                          &lt;span class="ui-spinner ui-widget ui-widget-content ui-corner-all"&gt;
                          &lt;input type="radio" name="group1" value="trimestre"style="opacity: 1!important;" /&gt; Trimestre    
                          &lt;/span&gt;
                          &lt;/div&gt;
                        &lt;div class="col-lg-3 col-md-3 ui-sortable"&gt;
                          &lt;span class="ui-spinner ui-widget ui-widget-content ui-corner-all"&gt;
  
                          &lt;select id="mois" name="mois" class="form-control" size="1"&gt;
                            &lt;option value="Janvier"&gt;Janvier&lt;/option&gt;
                            &lt;option value="Fevrier"&gt;Fevrier&lt;/option&gt;
                            &lt;option value="Mars"&gt;Mars&lt;/option&gt;
                            &lt;option value="Avril"&gt;Avril&lt;/option&gt;
                            &lt;option value="Mai"&gt;Mai&lt;/option&gt;
                            &lt;option value="Juin"&gt;Juin&lt;/option&gt;
                            &lt;option value="Juillet"&gt;Juillet&lt;/option&gt;
                            &lt;option value="Aout"&gt;Aout&lt;/option&gt;
                            &lt;option value="Septembre"&gt;Septembre&lt;/option&gt;
                            &lt;option value="Octobre"&gt;Octobre&lt;/option&gt;
                            &lt;option value="Novembre"&gt;Novembre&lt;/option&gt;
                            &lt;option value="Decembre"&gt;Decembre&lt;/option&gt;
                          &lt;/select&gt;
                          &lt;/span&gt;
                          &lt;/div&gt;
                        &lt;div class="col-lg-3 col-md-4 ui-sortable"&gt;
                            &lt;span class="ui-spinner ui-widget ui-widget-content ui-corner-all"&gt;
                            &lt;select id="trimest" name="trimest" class="form-control" size="1"&gt;    
                              &lt;option value="1er Trimestre"&gt;1er Trimestre&lt;/option&gt;
                             &lt;option value="2eme Trimestre"&gt;2eme Trimestre&lt;/option&gt;
                             &lt;option value="3eme Trimestre"&gt;3eme Trimestre&lt;/option&gt;
                             &lt;option value="4eme Trimestre"&gt;4eme Trimestre&lt;/option&gt;
                           &lt;/select&gt;    
  
                            &lt;/span&gt;
                          &lt;/div&gt;
  </code></pre>
  
  <p>and this is the script :</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
  
  
                       document.getElementById('trimest').disabled=true;
  
                      $('input:radio[name="group1"]').change(function() {
                        if ($(this).val() === 'mensuelle') {
                          // append stuff
                          document.getElementById('trimest').disabled=true;
                          document.getElementById('mois').disabled=false;
  
                        }
                        else {
                          document.getElementById('trimest').disabled=false;
                          document.getElementById('mois').disabled=true;
                        }
                      });
  
  
     &lt;/script&gt;
  </code></pre>
  
  <p>i have no problems here but when i include this file file in my page the script don't works</p>
  
  <p><a href="https://drive.google.com/file/d/0B9iqIn8LtQ7gdmdZYmlhYVM1alE/view?usp=sharing" rel="nofollow">https://drive.google.com/file/d/0B9iqIn8LtQ7gdmdZYmlhYVM1alE/view?usp=sharing</a></p>