I have a INDEX.html and some <DIV>'s that are populated with external HTML-files using jQuery LOAD()
Some of the external HTML's also contains Javascripts.
Seperately these external HTML's all perform well, when displayed in the DIV the script won't run.

There should be a solution to this but I cannot find it.....

This is the loading-function

>  <script type="text/javascript" > 
> $(document).ready(function() {
> $('a.linkje').click(function() {
>   var url = $(this).attr('href');
>   $('#master').load(url);
>   return false;
>   });
> });
> </script>

Some tips on HOW TO will be highly appreciated!

Member Avatar

If you read the documentation for the load method, there is the ability to provide a callback function that can be called.

Have your javascript in an external file and then when you load the html page using jquery.load, call the javascript in the external file.

    reference to externalpage.js
    reference to mypage.js



    function externalPage_complete(response, status, xhr){
            //code goes here


    $('div').load(url, {}, externalPage_complete);