title: Javascript inside a modal duplicated everytime I open the modal
body: <p>I have a bootstrap modal with a form and javascript inside.</p>
  
  <p>My modal content (called by ajax) :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;button class="action"&gt;Submit&lt;/button&gt;
  
  &lt;script&gt;
      $('.action').on('click', function(){
          alert('ok');
      });
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Everytime I click on my button, I have a lot of alert displayed (not only one), the javascript inside the modal is not reset/killed when I open and close the modal again and again.</p>