title: Put method with Ajax (the script isn't triggered)
body: <p>I am implementing Put method with Ajax:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en" xmlns:th="http://www.thymeleaf.org"&gt;
  &lt;head&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
          $(document).ready(function() {
              $('#submitPut').click(  function () {
                  console.log("click");
                  var sendName = $('#name').val();
                  var sendDescription = $('#description').val();
  
                  $.ajax({
                      url: '/musicalstyle',    //Your api url
                      type: 'PUT',   //type is any HTTP method
                      data: {
                          name: sendName,
                          description: sendDescription,
  
                      },      //Data as js object
                      success: function () {
                      }
                  })
                  ;
  
              });
          });
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form&gt; 
          &lt;label for="name"&gt;Nombre&lt;/label&gt;
          &lt;input type="text" id="name"  /&gt;
          &lt;label for="description"&gt;Descripción&lt;/label&gt;
          &lt;input type="text" name="description" id="description"/&gt;
          &lt;input id="submitPut" type="button"  value="SubmitPut"&gt;
  
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This form is working fine but when introduce it on real environment the script isn't called (my view in production environment is using Thymeleaf and Boostrap). It's like <code>&lt;button class="btn btn-primary" id="submitPut" type="button"&gt;Actualizar&lt;/button&gt;</code> isn't triggering the submitPut function.</p>
  
  <p>Here form of production environment:</p>
  
  <pre><code>    &lt;form&gt;
          &lt;div class="form-group row"&gt;
              &lt;label for="name" class="col-sm-2 col-form-label"&gt;Nombre&lt;/label&gt;
              &lt;div class="col-sm-6"&gt;
                  &lt;input type="text" class="form-control" id="name"&gt;
              &lt;/div&gt;
           &lt;/div&gt;
           &lt;div class="form-group row"&gt;
              &lt;label for="description" class="col-sm-2 col-form-label"&gt;Descripción&lt;/label&gt;
              &lt;div class="col-sm-6"&gt;
                  &lt;input type="text" class="form-control" id="description"&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;br&gt;
           &lt;button class="btn btn-primary" id="submitPut" type="button"&gt;Actualizar&lt;/button&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>How can I force to button call ajax function?</p>
  
  <p>Thanks,</p>