Bootstrap Modal Focus not working
<p>while making a web I didn't get focus in a "input" into Bootstrap Modal, I tried everything and didn't work, modal appears but input doesn't get focus. I have make a "test.php" with a simple modal and doesn't work either. Here is the "test.php"</p>

<pre><code>&lt;html lang="es"&gt;

&lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;


    &lt;link href="../css/bootstrap.min.css" rel="stylesheet"&gt;
    &lt;script src="../js/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script src="../js/bootstrap.min.js"&gt;



    &lt;script&gt;


$('#myModal').on('shown.bs.modal', function () {
    $('#referencia').focus();
})


    &lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;!-- Button trigger modal --&gt;
&lt;button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"&gt;
  Launch demo modal
&lt;/button&gt;

&lt;!-- Modal --&gt;
&lt;div class="modal fade" id="myModal"&gt;
  &lt;div class="modal-dialog"&gt;
    &lt;div class="modal-content"&gt;
      &lt;div class="modal-header"&gt;
        &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;
        &lt;h4 class="modal-title"&gt;Modal title&lt;/h4&gt;
      &lt;/div&gt;
      &lt;div class="modal-body"&gt;
        &lt;input name="referencia" id="referencia" type="text" class="form-control text-uppercase" placeholder="Descripci&amp;oacute;n"&gt;
      &lt;/div&gt;
      &lt;div class="modal-footer"&gt;
        &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
        &lt;button type="button" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
      &lt;/div&gt;
    &lt;/div&gt;&lt;!-- /.modal-content --&gt;
  &lt;/div&gt;&lt;!-- /.modal-dialog --&gt;
&lt;/div&gt;&lt;!-- /.modal --&gt;
&lt;/body&gt;
</code></pre>

<p>If I try this code on my server it doesn't work, on unelink.es server doesn't work either, but if I put the same code on "fiddle", works fine.</p>

<p>Any idea of what is wrong? If I need something else... or install something in server.</p>

<p>P.D. Sorry for my English.</p>