You need to have separate header and footer tags in you html like this
<body> <header></header> <p>This is some main content</p> <footer></footer> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="script.js"></script> </body>
and then for example in script.js you can add the below code
$(function(){ $('header').load('navbar.html'); $('footer').load('footer.html'); });
which will give you the result which you're expecting
Hi fella!
I already did your recomendation but the result is still the same, but i still try again your recommendation but the result is still the same.
Im still a newbie😔
I appreciate your recommendation😊
I have created the code here. Check this out codesandbox.io/s/header-footer-jqu...
Many many thank you brother.💕
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You need to have separate header and footer tags in you html like this
and then for example in script.js you can add the below code
which will give you the result which you're expecting
Hi fella!
I already did your recomendation but the result is still the same, but i still try again your recommendation but the result is still the same.
Im still a newbie😔
I appreciate your recommendation😊
I have created the code here. Check this out codesandbox.io/s/header-footer-jqu...
Many many thank you brother.💕