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 8305943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:13:50+00:00 2026-06-08T18:13:50+00:00

I am no stranger to front-end development, but I have come across a requirement

  • 0

I am no stranger to front-end development, but I have come across a requirement by a client which I have never done before, and I would appreciate it if someone can point me into the right direction.

I have 7 <section> tags within my index.html. Each section represents one of the site navigation link. so “Home” link will show “home section” and so on. And the requested section gets populated in the main-content view/wrapper.

Usually, I will employ a MVC framework to get this functionality going. However, I am asked not to implement MVC. My thoughts were to find out which navigation link was clicked and then load the particular section into the main-content-wrapper.

How can I make this happened so that main-content-wrapper’s height is adjusted accordingly, and there is a browser scroll bar if needed? Because some sections have a lenghty content.

By the way, main-content-wrapper’ overflow has been set to ‘auto’.

  • 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-06-08T18:13:51+00:00Added an answer on June 8, 2026 at 6:13 pm

    If you’re populating all the section-s on your page you can try this – http://jsfiddle.net/Fyhm7/

    HTML

    <a href="#" data-section="#home">Home</a>
    <a href="#" data-section="#products">Products</a>
    <a href="#" data-section="#contact">Contact</a>
    
    <section id="home">Home</section>
    <section id="products">Products</section>
    <section id="contact">Contact</section>
    

    JS

    $("a").on("click", function() {
        var id = $(this).data("section");
    
        $("section:visible").fadeOut(function() {
            $(id).fadeIn();
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange problem that I've never encountered before, I have data in
I have been working on the front-end to a universal iOS app, setting up
Strange, but I can't find a duplicate for this question. I have a superclass
Strange one this, which isn't programming related directly, but I thought it important to
Ok this is going to sound strange, but I have inherited an app that
I am running into a stranger error in Internet Explorer. I have a form_for
I have a form that is displayed, not by ShowDialog, but by setting its
I've currently coded all of the front-end design to work 100% correctly in Chrome.
I have developed a website using visual studio 2008. Which uses active index to
I've had this before, but can't seem to replicate the steps I did back

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.