0

after have read tons of different article on the web

i'm looking on a simple way to have in bootstrap my left menu, header and footer on a separate and unique file this is to prevent having to re-write anythings on each different pages of my application (i'm using a boostrap admin template)

thanks for your advices

jeebee
  • 21
  • 5
  • What's holding you from doing that? You can create a separate file for the menu/footer/header and add them dynamically to the page through jquery. Or, even better you could use AngularJS to make the menu/footer/header separate templates. – RaidenF Jan 05 '16 at 15:38
  • how can in include them in my boostrap page? – jeebee Jan 05 '16 at 15:43
  • Are you using only html css and javascript? Are you using jQuery or some other framework? – RaidenF Jan 05 '16 at 15:47
  • HTML/CSS javascript jquery and boostrap – jeebee Jan 05 '16 at 15:48
  • Have you read this answer? http://stackoverflow.com/questions/18712338/make-header-and-footer-files-to-be-included-in-multiple-html-pages – RaidenF Jan 05 '16 at 15:52
  • thanks after lot of try, i finally use $(function(){ $("#header").load("header.html"); $("#footer").load("footer.html"); }); – jeebee Jan 05 '16 at 17:09

1 Answers1

0

Finally, after lots of tries, I use:

 $(function(){   $("#header").load("header.html");   
 $("#footer").load("footer.html");  });

Don't know why, it doesn't work 100% on a local file, but it's ok on the web site.

Pang
  • 9,564
  • 146
  • 81
  • 122
jeebee
  • 21
  • 5