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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:51:42+00:00 2026-05-29T05:51:42+00:00

ive created the following code. it shows the tabs i want but the content

  • 0

ive created the following code. it shows the tabs i want but the content on the page doesnt change when i click a tab. the content for all the tabs is shown on the same page. when i click a tab the link goes in the address bar in the browser.
any ideas how to stop this link happening and to get the content separated into tabs?

Sonachan – Bar

    <link href="/scripts/jui/jquery-ui.css" rel="stylesheet" type="text/css" />
    <link href="/fancybox/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" />
    <link href="/styles/layout.css" rel="stylesheet" type="text/css" />

    <script src="/scripts/jquery.js"></script>
    <script src="/scripts/jui/jquery-ui.js"></script>
    <script src="/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
    <script src="/scripts/main.js"></script>
</head>
<body>
    <div id="container">
        <div id="admin-tabs" class="col">
            <ul>
                <li>
                    <a href="#admin-tabs-1"><span>Add an Item</span></a>
                </li>
                <li>
                    <a href="#admin-tabs-2"><span>Change an Item</span></a>
                </li>
                <li>
                    <a href="#admin-tabs-3"><span>Add a Category</span></a>
                </li>
                <li>
                    <a href="#admin-tabs-4"><span>Change a Category</span></a>
                </li>
            </ul>
        </div>
        <div id="admin-page">
            <?php //add an item ?>
            <div id="admin-tabs-1">

                <div class="admin-heading">Add an item</div>
                <form id="additemform">
                    <table>
                        <tr>
                            <td>
                                Select a category:
                            </td>
                            <td></td>
                            <td>
                                <select>
                                    <?php foreach (Category::model()->findAll() as $category): ?>
                                        <option id="cat-<?php echo $category->id; ?>"><?php echo $category->name; ?></option>
                                    <?php endforeach; ?>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Product name:
                            </td>
                            <td></td>
                            <td>
                                <input></input>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Product price:
                            </td>
                            <td id="poundsign">£</td>
                            <td colspan="2">
                                <input id="price-pounds"></input>
                                .
                                <input id="price-pence" maxlength="2"></input>
                            </td>
                        </tr>
                        <tr>
                            <td><input type="submit" value="Create!"></input></td>
                        </tr>
                    </table>
                </form>
            </div>
            <div id="admin-tabs-2">
                content of tab 2
            </div>
            <div id="admin-tabs-3">
                content of tab 3
            </div>
            <div id="admin-tabs-4">
                content of tab 4
            </div>
        </div>
</body>

and this is my jquery :

$(function() {
$("#admin-tabs" ).tabs();
});
  • 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-29T05:51:43+00:00Added an answer on May 29, 2026 at 5:51 am

    The plugin jQuery UI Tabs expects the panels (tab content) to be within the container you apply the .tabs() on, which is not the case with your markup.

    To find your panels (#admin-tabs-1, #admin-tabs-2, …), the plugin will search into the container #admin-tabs and from your markup it does not find any of them as they are outside the container.

    You have:

    <div#admin-tabs>
        <ul>
            <li #admin-tabs-1>
            <li #admin-tabs-2>
            <li #admin-tabs-3>
        </ul>
    </div>
    <div>
        <div#admin-tabs-1>
        <div#admin-tabs-2>
        <div#admin-tabs-3>
    </div>
    

    The plugin expects:

    <div#admin-tabs>
        <ul>
            <li #admin-tabs-1>
            <li #admin-tabs-2>
            <li #admin-tabs-3>
        </ul>
        <div#admin-tabs-1>
        <div#admin-tabs-2>
        <div#admin-tabs-3>
    </div>
    

    Move your panels next to the <ul>.

    Also make sure you linked the CSS stylesheets that comes along with the jQuery UI library.

    Your markup: DEMO

    Expected markup: DEMO

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

Sidebar

Related Questions

I've been using the following code to create various struct, but only give people
The following code is a method I created inside a UIViewController to popup/down a
In the following code I've created a JTable in class main and I'm starting
I've created a file in the tmp directory with the following controller code: def
The following code shows a torus slowly revolving and coming into display: package com.objloader.example;
Okay, so I've got the following code shown below to create a dialog using
I've written the following code to create a three-column layout where the first and
I've created the following regex pattern in an attempt to match a string 6
I've created a JVMTI agent that does the following at a high level: onClassLoadHook
Consider the following mock-up image I've created: I am new with working with InfoPath

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.