title: executing a function after submiting
body: <p>I am not able to call jQuery on submit. The  $('#container').highcharts({}) in the function is not displayed .
  My object is  to display a line charte after the submit of the form. But the function called in the script didn't executed .</p>
  
  <p>here's my code:</p>
  
  <pre><code>         &lt;script src="https://code.highcharts.com/highcharts.js"&gt;&lt;/script&gt;
        &lt;script src="https://code.highcharts.com/modules/exporting.js"&gt;&lt;/script&gt; 
  
      &lt;html&gt;
       &lt;head&gt;
         &lt;title&gt; &lt;/title&gt;
             &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"&gt;&lt;/script&gt;
  
      &lt;/head&gt;
      &lt;body&gt;
  
        &lt;form Action="Home/Index" method="post"  id="roleManagement" &gt;
  
              &lt;span&gt;&lt;b&gt; Choisir le taux de change  &lt;/b&gt; &lt;/span&gt;&lt;br /&gt;
              &lt;div id="checkboxes"&gt;
               &lt;br&gt;
             &lt;input type="checkbox" name="taux" value="EUR/USD" checked="checked" &gt;EUR/USD&lt;br&gt;
               &lt;br&gt;
              &lt;/div&gt;
             &lt;table&gt;
                  &lt;tr&gt;
                      &lt;th&gt;Date de début&lt;/th&gt;
                      &lt;th&gt;Date de fin&lt;/th&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                      &lt;input type="Date" name="date_début" id="date_début" /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                      &lt;input type="Date" name="date_fin" id="date_fin"  /&gt;
                      &lt;/td&gt;
                  &lt;\tr&gt;
             &lt;/table&gt;
  
              &lt;br /&gt;
            &lt;input type="submit" value="CHERCHER" name="affiche"  /&gt;
            &lt;input type="reset" value="Reset"&gt;@Html.ActionLink("Réessayer", "Index")&lt;/button&gt;
        &lt;/form&gt;
       &lt;script&gt;
           $(document).ready(function() {
             $("#roleManagement").submit(function() {
             $('#checkboxes input:checked').each(function () {
             $('#container').highcharts({
                 title: {
                    text: 'Taux de change',
                     x: -20
                        },
                subtitle: {
                    text: 'taux de change',
                    x: -20
              },
                xAxis: {
                  categories: [1, 3, 9]
  
                       },
                yAxis: {
                    title: {
                        text: 'Taux de change'
                           },
                   plotLines: [{
                      value: 0,
                      width: 1,
                      color: '#808080'
                  }]
              },
              tooltip: {
                  valueSuffix: '°C'
              },
              legend: {
                  layout: 'vertical',
                  align: 'right',
                  verticalAlign: 'middle',
                  borderWidth: 0
              },
              series: [{
                  name: 'EUR/USD',
                  data: [4, 8, 9]
  
              }]
  
          });
          });
      });
      $.each(selected, function (key, value) {
          alert(key + ": " + value);
      });
  });
     &lt;/script&gt; 
    &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>