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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:08:04+00:00 2026-06-15T23:08:04+00:00

I have jQuery UI tabs set up, but a problem that I’m having with

  • 0

I have jQuery UI tabs set up, but a problem that I’m having with links to different pages is that they load all contents of the page into the tab. This includes the footer, header, and other navbars that I don’t want in the tab. What if I would only like to load a single ID from that page?

My tabs are set up this way:

<div id="mytabs">
<ul>
 <li><a href="derpsite.com/awesomepage">Awesome page</a></li>
 <li><a href="derpsite.com/foo">Foo</a></li>
</ul>
</div>

Nothing much going on in the jQuery…

$(function() {
$( "#mytabs" ).tabs();
});

Let’s say this is the html of “awesomepage” (that the first link targets):

<html>
<head>
<title>awesome page</title>
</head>
<body>
<div id="header">bla</div>
<div id="awesomeness">awesomeness!</div>
<div id="footer">fdsfd</div>
</body>
</html>

…And I only want the tab to load #awesomeness from the page. How would I go about doing this? I’ve read into some guides that do that by adding a data-target="#youridhere" attribute to the HTML, but I’m still confused on how to implement the javascript. It seems like this is a convenient solution, as I won’t be targeting the same ID in every page. Any clues on how to get the javascript working?

Thanks in advance!

  • 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-15T23:08:05+00:00Added an answer on June 15, 2026 at 11:08 pm

    Got the solution 🙂 Using one of the answers as a reference point, the tabs can now load a single element specified in the data-target attribute. Here is the modified version:

    $(function() {
    $('#tabs').tabs(
    {
    beforeLoad: function(event, ui) {
    if (ui.panel.children().size() > 0)
        return false;
    ui.panel.load($('a', ui.tab).attr('href') + $('a', ui.tab).attr('data-target'));
    return false;
    }
    });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a set of jQuery UI AJAX tabs that load individual .php pages
I have a set of jQuery UI tabs that each load project.php using ajax.
I have a page containing a set of jQuery tabs. All the tabs point
I have a set of JQuery's tabs that work fine--the tabs connect to the
I have a page that uses jQuery tabs to tabify a set of HTML
so I have this code for tabs in jquery, the href is set to
I have jquery tabs on my website but on smaller screens the tabs wrap
I have a page that is using jQuery tabs. Within one of my tabs
I have a jQuery search script that uses tabs for the user to define
I have a problem with my jquery UI tabs currently only in Firefox 3.6.24

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.