Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6967869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:22:42+00:00 2026-05-27T16:22:42+00:00

Is there any jquery pluginto use to keep common header and footer in a

  • 0

Is there any jquery pluginto use to keep common header and footer in a HTML page?

Like if i can add header.html and footer.html into index.html.

I know I can with php but if possible I want to do without installing any server on my local PC. later after all work done i will use php includes

header.html

<title>Template</title>
<meta name="description" content="">
<link rel="stylesheet" href="css/styles.css?v=1.0">
<script src="js/modernizr-2.0.6.min.js"></script>

index.html

{include header.html}

<body class="home">

{include footer.html}

Footer.html

<footer class="f1">
    <p>copyright &copy; year</p>
</footer><!-- .f1 -->

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script src="js/general.js"></script>
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:22:43+00:00Added an answer on May 27, 2026 at 4:22 pm

    jQuery itself has some features that allow you to do that. If you can select header’s/footer’s container on each page, you can insert any common content you want, even replace the existing one.

    jQuery replacing common parts of site

    You can do something like this:

    jQuery(function(){
        jQuery('.header').html('SOME COMMON HEADER');
        jQuery('.footer').html('SOME COMMON FOOTER');
    });
    

    See it in action here: http://jsfiddle.net/6sCfm/

    jQuery loading external files into containers

    Or, if you insist on loading external files, you can do this (using .load()):

    jQuery(function(){
        jQuery('.header').load('header.html');
        jQuery('.footer').load('footer.html');
    });
    

    but pay attention to correct paths you are giving as parameters and make sure, that files should have only the HTML you need (no <head>, <body> tags, etc. – it will make HTML incorrect).

    Loading parts of pages into containers

    If you have whole pages (with <head>, <header> etc.), you can load only parts of them. Preferably give meaningful IDs to the parts you want to load (eg. header and footer) and supply them in the path, after space, as selector:

    jQuery(function(){
        jQuery('.header').load('header.html #header');
        jQuery('.footer').load('footer.html #footer');
    });
    

    This should be flexible enough 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any jQuery plugin for progressive light glow effect like this ?
Hi I was wondering if there is any jquery function around which can take
Is there any opensource samples of JQuery usages of StackOverFlow-like sites...... Any help in
is there any jQuery plugin to create something like the live feed from the
Is there any jquery plugin that does google images like smooth hover effect? Any
Is there any jquery plugin similar to Whatever:hover http://www.xs4all.nl/~peterned/csshover.html ?.I'm using jquery library already
is there any jquery or another brand of plugins which can resize image inside
Are there any jQuery 1.3 animation-transitions that work in both Firefox 3 and IE7?
Is there any jquery plugin for implementing iGoogle style dashboard? So basically drag n
is there any jquery or any script, that when u click on one link,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.