如何给jquery加载函数提供相对路径

时间:2013-08-13 07:50:38

标签: jquery load

<script src="jquery.js"></script>
<script>
    function loadContent() {
        $("#includedContent").load("../Projects/menu.html"); //  Not working
    }    
</script> 

<div id="includedContent"></div>

<script>
    loadContent()
</script> 

1 个答案:

答案 0 :(得分:0)

$(document).ready(function(){
    $('#includedContent').load("../Projects/menu.html", function() {
       //stuff
    });
});