From the load jquery docs you can read
Script Execution
When calling .load() using a URL without a suffixed selector expression, the content is passed to .html() prior to scripts being removed. This executes the script blocks before they are discarded. If .load() is called with a selector expression appended to the URL, however, the scripts are stripped out prior to the DOM being updated, and thus are not executed.
And you are calling load with a selector expression...
I would do in other way.
- Modify your map.js to contain a function (i.e mapInit ) that executes your map stuff.
- Put all this scrips tag in head of the general html document.
Call load with a callback to your map function
$(document).ready(function(){ $('#menu li').click(function(){ $('#content').load(this.id + '.html #content *',mapInit()); }); });