title: Scripts executed only once, with async bootstrap modal
body: <p>I have a modal, like the one below, that load asynchronously its content, with a jQuery <em>jQuery.ajax()</em> method.</p>
  
  <pre><code>&lt;script&gt;alert('test!')&lt;/script&gt;
      &lt;div class="modal" tabindex="-1" role="dialog"&gt;
      &lt;div class="modal-dialog" role="document"&gt;
        &lt;div class="modal-content"&gt;
          &lt;div class="modal-header"&gt;
            &lt;h5 class="modal-title"&gt;Modal title&lt;/h5&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;/div&gt;
          &lt;div class="modal-body"&gt;
            &lt;p&gt;Modal body text goes here.&lt;/p&gt;
          &lt;/div&gt;
          &lt;div class="modal-footer"&gt;
            &lt;button type="button" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
            &lt;button type="button" class="btn btn-secondary" data-dismiss="modal"&gt;Close&lt;/button&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>Why when I trigger the first time the modal, <strong>and only</strong> the first time, the alert dialog box appears? If I try again, without reloading the page, I get no more alert dialog box…</p>
  
  <h1>HTML Codes</h1>
  
  <h2>Steps attempts</h2>
  
  <p>I tried to add some basic <a href="http://www.jquery-steps.com/Examples#basic" rel="nofollow noreferrer">Steps</a> inside the async Modal, but it only works the first time… (like any other piece of js code…)</p>
  
  <h2>The javascript code</h2>
  
  <p>Here the button that trigger the modal call:</p>
  
  <pre><code>&lt;button class="btn btn-primary btn-xs" onclick="modalCall('Details')"&gt;Details&lt;/button&gt;
  </code></pre>
  
  <h1>And the async calls:</h1>
  
  <h2>The first attempt, before reading the <a href="https://api.jquery.com/load/#script-execution" rel="nofollow noreferrer">doc</a>:</h2>
  
  <pre><code>function modalCall(url)
  {
     $('.modal-content').load(url);
  }
  </code></pre>
  
  <h2>The second with $.get… without success</h2>
  
  <pre><code>$.get( url, function( data ) {
      $('.modal-content').html( data );
      alert( "Load was performed." );
    });
  </code></pre>
  
  <p>Here the <strong>alert( "Load was performed." );</strong> is executed each time I push the button, but not the code inside the modal…</p>
  
  <p>And I get nothing in the console…</p>