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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:47:24+00:00 2026-06-15T09:47:24+00:00

My page is rather simple and direct. I first call in external PHP pages

  • 0

My page is rather simple and direct. I first call in external PHP pages as elements within my page using DIV tags. I then hide the div’s that aren’t needed on the home page and then slide into view the wanted “page” and hide the unwanted.

What I would like to do is slide in the wanted content and slide out what ever content is currently active/visible. I know I can just continue down the line what I’ve already begun doing but the entire document would be SO bloated. Any ideas? Thanks!

    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

  <script>
  $(document).ready(function(e) {
$(function(){
    $("div.design, div.marketing").hide();
    });
});

  $(document).ready(function() {

$("h3.home_button").click(function () {
      $("div.home").show("slide", { direction: "left" }, 500);
      $("div.design").hide();
      $("div.marketing").hide();
});

$("h3.design_button").click(function () {
      $("div.design").show("slide", { direction: "left" }, 500);
      $("div.home").hide();
      $("div.marketing").hide();
});

$("h3.marketing_button").click(function () {
      $("div.marketing").show("slide", { direction: "left" }, 500);
      $("div.home").hide();
      $("div.design").hide();
});


  });
  </script>

</head>

<body>

<div class="main">

    <div class="header">
        <?php include("header.php");?>
    </div>

    <div class="menu">
        <?php include("menu.php");?>
    </div>

    <div class="content">
        <?php include("content_home.php");?>
        <?php include("content_design.php");?>
        <?php include("content_marketing.php");?>

    </div>
    <div class="footer"><?php include("footer.php");?></div>

</div>
  • 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-15T09:47:25+00:00Added an answer on June 15, 2026 at 9:47 am

    You could use the data attributes and access it by the data() jquery method.

    in your HTML

    <h3 data-a='marketing'>marketing</h3>
    <h3 data-a='design'>design</h3>
    <div class='container'>
        <div style='display:none;' class='marketing'>
             marketing stuffs
        </div>
        <div class='design'>
             design stuffs
        </div>
    </div>​
    

    and in your javascript

    $('h3').click(function(){
        type = $(this).data('a');
    
        $('.container div').hide();
        $('.container').find('.'+type).show();
    })​
    

    Here is an exemple fiddle

    Also you are calling ready method twice

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

Sidebar

Related Questions

I have a strange behaviour. I am using a rather heavy page (4000 nodes)
I'm creating a rather simple site for my company for tagging inventory and tags.
I am just started with PHP and have a rather simple problem I can't
I'm new to PHP and have run into a rather simple yet annoying issue.
I have a rather simple informational website that's being run by Django. Its' pages(views)
I have a rather simple login page in my Android app, containing a header,
I have a page which loads its inner content using jquery and a simple
This is not about a simple 2 column page layout. Rather it's about how
hey guys, i'm trying to do a rather simple select box by myself. <div
I have a simple html page with a rather simple css , and it

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.