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

  • SEARCH
  • Home
  • 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 979335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:12:14+00:00 2026-05-16T04:12:14+00:00

I have the following index.html page set-up: <html> <head> </head> <body> <div id=container> <div

  • 0

I have the following index.html page set-up:

<html>
  <head>
  </head>
  <body>
    <div id="container">
      <div id="header">
      </div>
      <div id="sidebar_menu">
      </div>
      <div id="thecontent">
        <div id="page_banner">
        </div>
        <div id="page_content">
        </div>
        <div id="page_footer">
        </div>
      </div>
    </div>
  </body>
</html>

In addition to this, I have several individual .html files that reflect an option in my sidebar menu, so when the user first lands on the page, they will see index.html file based on the above setup, ie. shows header/menu/the content and footer.

My question is, when the user clicks on say the “About Us” menu option, I actually want to just replace “thecontent” div with the contents of my about-us.html file but without reloading the header and sidebar menu. I just want the entire div “thecontent” to be replaced with the div “thecontent” from my about-us.html file.

Is this possible as like I said, I have several individual .html files and really don’t want to duplicate code like my sidebar menu in every page as only my content will be changing based on menu selection.

I looked at jQuery.load() from this tutorial.

I think though this will not work. Also saw the .replacewith() but unsure if this is correct and if it is, unsure how to use in my scenario to go off and replace div with an external .html file.

  • 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-16T04:12:15+00:00Added an answer on May 16, 2026 at 4:12 am

    jQuery’s load method has a special syntax that allows you to select what content you want to load from the URL you provide. You simply specify a CSS selector after your URL.
    (Read the documentation, under “Loading Page Fragments”)

    For example:

    $("#thecontent").load("about-us.html #thecontent");
    

    Hosted demo:

    http://jsbin.com/uvera3 (Editable via http://jsbin.com/uvera3/edit)

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

Sidebar

Related Questions

I have the following jQueryMobile page anatomy at index.html: <div data-role=page> <div data-role=header>...</div> <div
In my rails view(index.html.erb), i have following structure <div> <%= render :partial => create
I have the following code <xsl:result-document href=output1/output3/index.html format=html> <html> <head> <SCRIPT LANGUAGE=JavaScript> function getParams()
I have the following code: <html> <head> <title><?php echo $GLOBALS['L']['title']; ?></title> </head> <body> <ul
I have the following file structure: |- index.html vendor |- jquery.min.js (some libraries) js
I have the following html text. <ol class=otherstufflinks> <li> <a href=./pythonNotes/index.html>Python notes</a> </li> <li>
I have the following directory structure : /script/x.js /includes/x.txt /1/2/index.html After hooking a webpage
I have the following form: @model Teesa.Models.SearchModel @using (Html.BeginForm(Index, Search, FormMethod.Get, new { id
I have in my app/views/bar/index.html.haml the following %p= render partial: 'foo', collection: @foos the
I have the following 3 simple pages in a JSF app. index.html start.html confirmSuccess.thml

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.