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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:14:32+00:00 2026-05-17T15:14:32+00:00

I have three pages 1) index.aspx 2) schools.aspx 3) Classes.aspx All the pages has

  • 0

I have three pages

1) index.aspx
2) schools.aspx
3) Classes.aspx

All the pages has same div section in there pages. Please see below the common DIV section in all the pages, however text will be different for each page.

<div id="tab-container" class="tabs-container">
    <div class="contentContainer">
        <img width="275" height="220" title="" alt="" src="/99/english/images/fpoSquare.jpg" class="imgRight"></img>
        <p class="destinationSectionHeader first">About Sydney</p><p>Learn English at a Kaplan International Colleges English school! We offer a variety of English courses at over 40 English schools in some of the world's most desirable locations in the UK, Ireland, Australia, New Zealand, USA, Canada and Malta.From fashionable city centre schools to schools on the campuses of prestigious universities, you can take an English course at a Kaplan International Colleges school in the environment that best suits you. All of our English schools provide our students with easy access to great resources and the local area's best cultural, social and historic attractions.
Study in the world-famous Empire State Building in New York, in a beautiful 7-storey art deco building next to the famous Cathedral Square in Christchurch, on Santa Barbara City College's impressive campus, in a historic building in London or in the heart of Sydney. You can have a look at all our schools and English courses by browsing through our website - so take your time and choose the English school that's right for you.</p>
    </div>
</div>

Now on index page I have got links for other two pages (Schools.aspx and Classes.aspx), when user will click on those links it will show above section based on div id=”tab-container” taken from those pages and will show in a div section of index page below.

<div id="contents"></div>

Please suggest how can I achieve this functionality using AJAX and JQuery. (It would be good have solution using AJAX)

Thanks!

Update:

All the above links (schools, classes etc) are coming from below html code

ul class="tabHead tabs-nav">
    <li class="tabLeftEnd"></li>
    <li class="tabs-selected" id="tab-1">
    <a class="load-fragment" href="/index.aspx"><span>Overview</span></a></li>
    <li id="tab-2">
    <a class="load-fragment" href="/schools.aspx"><span>Guide</span></a></li>
    <li id="tab-3">
    <a class="load-fragment" href="/classes.aspx"><span>Flight Schedule</span></a></li>
    <li id="tab-4">
    <a class="load-fragment" href="/specialOffers.aspx"><span>Special Offers</span></a></li>
    <li id="tab-5">
    <a class="load-fragment" href="/photo.aspx"><span>Photos</span></a></li>
    <li class="tabRightEnd"></li>
</ul>

If you see there is a class “tabs-selected” on selected li, I want this to be changed according to the link clicked in the code as suggested by ” Marko Ivanovski”

Thanks again!

  • 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-17T15:14:33+00:00Added an answer on May 17, 2026 at 3:14 pm

    Using jQuery load() you can easily load page fragments.

    Update
    Let’s set a class (you can change this to whatever) for every link that we want to load via ajax. This is a good approach because users without Javascript will just navigate to the pages.

    HTML

    <a href="Schools.aspx" class="load-fragment">Schools</a>
    <a href="Classes.aspx" class="load-fragment">Classes</a>
    

    jQuery

    $(".load-fragment").click(function(e) {
        // Stop the browser from going to the page
        e.preventDefault();
    
        // add tabs-selected class for the selected item
        $(".tabs-nav li").removeClass("tabs-selected"); //remove selected from other tabs
        $(this).parent().addClass("tabs-selected");
    
        // store the href in a variable
        var href = $(this).attr('href'); // this is the clicked link's href attribute
    
        // load the data
        $("#contents").load(href + " #tab-container", function() {
            // perform some action when the content is loaded
            $(this).fadeIn('slow');
    
            // unsure if $(this) works with .load(), use the line below if it doesn't
            $("#contents").fadeIn('slow');        
        });
    });
    

    That’s it 🙂

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

Sidebar

Related Questions

I have two pages, the parent and from this page I am using: window.open('OrderDetailsFull.aspx?ObjectID='
I have the following markup inside a master page <html xmlns=http://www.w3.org/1999/xhtml > <head runat=server>
i have a problem so hope you guys can help! I have a string
[edit]: Figured out where it goes wrong. It has something to do with my
I have a problem with two htaccess files that i have in a hosting
I have been searching for a couple hours for a way to accomplish this
Scott Gu wrote an excellent article explaining how to apply the Data Annotation validation
Hey, one more newbie here, just playing around with .NET MVC. My main task
I'm working on a commenting system for a website and on each postback a
I wrote a simple Python script to download a web page for offline viewing.

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.