I\'m trying to implement some code that will create the headers and footers on all of my web pages instead of hard coding them. I tried this:
I had this in my \"main pag
Using .load() may help, then just put the code you want to include in the file you are linking to.
$('.headerChild').load('pathto/headerProto.html')
An alternative way if you do not want to keep the data in a separate file: I have not done this but from some quick research you can also link to an element within the file.
$('.headerChild').load('pathto/mainPage.html #headerProto')