.load() page <script> problem... [hard to summaries a title for this issue...]

.load() page <script> problem... [hard to summaries a title for this issue...]

Hi, sorry... I don't know how to describe this problem or give a good title...
but, try this out on any of your page...

  1. $( '#btn' ).click(function(){
    $( '#container' ).load('testing.html');
    });
and put this inside testing.html

  1. <script type='text/javascript'>
  2. $( document ).ready(function(){
  3. $( '#testing' ).text('executed');
  4. });
  5. </script>
  6. <div id='testing'>no script</div>
try to click the button#btn 3 times...
you will find the loaded testing.html will only run the script 2 times..
then it will show no script for the rest....

I tried it on chrome, firefox.

anyone know to solve this problem or who was trying to make a full ajax site may have alternative way to load and remove??