您的代码将在整个页面加载后进行评估。 (http://www.w3schools.com/jquery/jquery_syntax.asp)
如果您希望额外的HTML与页面的其余部分同时呈现,则必须将其复制粘贴到页面中或通过服务器端语言(例如PHP)加载其内容。
$(function(){ // document-ready event
// code is executed after the page loads
});
<?php
$header = file_get_contents('/path/to/header.html');
echo $header;
?>
<div class="fixed shadow" id="includeHeader"></div>
<script>
$("#includeHeader").load("Navigation.html");
</script>
$(function(){})
在文档准备就绪时运行。因此,整个文档准备就绪后,您的页面开始加载。您不想延迟加载Navigation.html
直到整个页面准备就绪,对吗?