Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reuse footer with only HTML/CSS?

Is there some solution that will allowing reusing a footer on multiple pages if all you have is HTML/CSS and perhaps javascript?

like image 861
4thSpace Avatar asked Dec 06 '22 18:12

4thSpace


1 Answers

You could place your footer HTML in a separate file, and then use javascript to load the HTML content of that file, and append it to a div in your page.

$("#footer").load("footer.html"); 

Like so: https://plnkr.co/edit/J8qc8221kal11BcPbALj?p=options

like image 197
Thomas Avatar answered Dec 24 '22 22:12

Thomas