jQuery 1.5 .load() - possible bug with imported Javascript?

jQuery 1.5 .load() - possible bug with imported Javascript?

Forgive me if I'm mistaken with this I haven't been using jQuery for long.


On my site I wanted to use the .load function to "import" some Javascript into the page and have it execute, I followed the documentation which says :


 $('#result').load('ajax/test.html #container'); 

Using Firebug I checked the response and everything seemed to have worked fine but the Javascript didn't execute as expected.


If I changed the code to


 $('#result').load('ajax/test.html#container'); 

Basically just removing the space between the file name and the id to be imported then the Javascript imported and executed as expected.

As I'm new to jQuery I just followed the documentation so I'm wondering should there be another section for the documentation for importing Javascript or is this a bug?