Skip to content
Loading
 and make sure your Header.html
is in the same folder as your current html. 
+2
  • +2
    yes it is in the same folder
    +2
  • Sachin Singh
    +2
    even after using ready function as i suggested in the code, it still dint work?
    +2
  • Sachin Singh
    +2
    test this
    if this works, meaning if external page loads then it is the issue of your folder structure
    1. "text/javascript">  
    2.    $(document).ready(function(){  
    3.        $("#new-header").load("https://www.sharpencode.com");  
    4.    });  
    5.   
     
    +2
  • Sachin Singh
    +2
    is there any error in the console
    press f12 and click on console tab on chrome.  
    +2
  • +2

    it is in the same folder

    +2
  • Sachin Singh
    +2
    Then you have not included Jquery to your project and page.
    +2
  • Sachin Singh
    +2
    Then you page is blocked by chrome due to null origin CORS issue.
    +2