Display or conceal content, revealing only the current information

Apologies for the confusing title, I struggled to find the right words to describe this situation!

Essentially, I have a webpage that displays content on the same page using jQuery. When the page initially loads, a brief section opens up. However, when you click on another link, the current content should close and the new content should load. I've attempted ".show(0).siblings().hide(0);" but it ends up hiding everything and only showing the specific div.

Below is the code snippet:

<html>
<head>
<link rel="stylesheet" type="text/css" href="CSS-reset.css">
<link rel="stylesheet" type="text/css" href="testing.css">
<script src="http://code.jquery.com/jquery-latest.js"></script>

<header id="header-main" role="Header, banner, logo">

    <hgroup class="logo" role="logo">
    <img src="Logo.png" width="150" height="150">
    </hgroup>
</header>

 <nav class="navigation" role="navigation">

    <a href="#" id="briefLink">Brief</a><br />
    <a href="#" id="researchLink">Research</a><br />
    <a href="#" id="ideasLink">Ideas</a><br />
    <a href="#" id="designLink">App Design</a><br />
    <a href="#" id="implementationLink">Implementation</a>
</nav>      

    <section class="content brief" role="Things about the brief">
    BRIEF
    </section>

    <section class="content research" role="Things for research">
    RESEARCH
    </section>

    <section class="content ideas" role="The ideas part goes here">
    IDEAS
    </section>

    <section class="content design" role="The design part goes here">
    DESIGNS
    </section>

    <section class="content implementation" role="The implementation goes here">
    IMPLEMENTATION
    </section>


    <script>

    $(document).ready(function()
    {
        //$('.brief').hide();
        $('.research').hide();
        $('.ideas').hide();
        $('.design').hide();
        $('.implementation').hide();

          $('#researchLink').click(function()
          {
                var divname= this.name;
                $('.research').show(0).siblings().hide(0);
          });

          $('#ideasLink').click(function()
          {
                $('.ideas').show();
          });

          $('#designLink').click(function()
          {
              $('.design').show();
          });

          $('#implementationLink').click(function()
          {
              $(toggle);
              $('.implementation').show();
          });

    }); 

</script>   

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Using an HTML form to send a PDF file through Nodemailer

A form with an upload file input needs to allow users to upload their file and send it through the form. Currently, the attached PDF file in the email doesn't contain any data and won't open properly. The nodemailer options are set up as follows ...

Tips for implementing this jQuery functionality within an AngularJS directive

How can I incorporate this jQuery code into my Angular project? jQuery.prototype.stars = function() { return $(this).each(function() { var val = parseFloat($(this).html()); var size = Math.max(0, (Math.min(5, val))) * 16; var $span = $ ...

Having trouble getting Bootstrap to function correctly on an HTML page

I am facing difficulty in identifying the issue. I have replaced the body content with that of another website, which works perfectly fine. However, despite trying to initialize bootstrap elements through both relative paths and CDN, they are not showing u ...

What is the best way to position the footer at the bottom of the page without obstructing any content?

I am currently working on a project that utilizes Bootstrap, and I am facing an issue with positioning the footer. Ideally, I want the footer to stay fixed at the bottom of the screen when there is not enough content to fill the page. However, when the con ...

Utilizing jQuery's :not() selector with multiple classes within a table row

My approach involves utilizing jQuery to alternate row colors by targeting all the tr tags associated with a table for coloring. However, there are instances where I need to exclude certain rows from being colored. In such cases, I use a class called "rowS ...

Navigating through dropdown browser menus using VBA

I am looking to automate the process of looping through a dropdown list on a specific website and downloading the latest file for each entry. I have successfully opened the website and clicked the "submit" button, but I am struggling to find a solution to ...

Enhance Your CSS Abilities with These Helpful Guides

Over the past month, I've immersed myself in learning CSS. My journey began with devouring all the information I could find on www.w3school.com, followed by delving into CSS Mastery 2nd edition. While I have successfully built a couple of websites, I ...

Styling with CSS - Mastering the Genesis Bootstrapped Column Grid

Having some issues with the alignment of the margins on my widgetized home-page for a WordPress Genesis theme - Outreach Pro. The two “About” widget areas on the top row are not lining up correctly with the third (Friends) & fourth (Donate) widget are ...

An empty row in ng-option continues to be visible within the select menu

Hello, I am facing an issue with a select menu in AngularJS. Here is the relevant code: $scope.GetAllSnimateljiBaseInfo = function () { $http.get(serviceBase + "GetAllSnimateljiBaseInfo", { timeout: 6000 }) .success(function (response) { ...

Elements styled as inline blocks with static dimensions, irregular in size

Is there a way to ensure that all three boxes are displayed at the same level? Currently, box 2 appears below box 1 and 3 due to having less content. I believe there must be some styling element missing to make each div display at an equal level regardless ...

What is the best way to toggle the visibility of a div's border in my current situation?

Let's talk about a div element: <div id="fruit-part"> <input type="radio" name="fruits" value="apple">Apple <input type="radio" name="fruits" value="orange">Orange </div> Here is the CSS that defines the border co ...

How Vue.JS can efficiently send computed values from the parent component to the child component using props

In my demo app, I have a scenario where I am generating a random number through a computed property in the root component. This random value is then passed to a child component using props. However, I am struggling to find the correct approach to update t ...

Personalized button utilizing Bootstrap 4

Seeking assistance to create a button with a 3D effect. I want to mimic the appearance of this button: https://i.sstatic.net/9sFs5.png Currently using Bootstrap to generate a button using this code: <button type="button" class="btn btn-primary">Gam ...

A guide on how to selectively blur and make the background transparent in jgrowl notifications without affecting the content

After some experimentation, I found that making the jGrowl notification background both transparent and blurry was not possible. When applying blur to the background, the content also became blurry, which is not the desired effect. If you want a transparen ...

I'm confused as to why my modal isn't appearing when the page loads

Recently, I've taken up coding as a hobby. However, I've encountered an issue with my modal not popping up on page load. Strangely, it works perfectly fine when I open a blank document but fails to load on my friend's homepage. I am using Dr ...

Performing various JavaScript functions within a single hyperlink

I've implemented the Tab Content Script by dynamicdrive.com on my website. The script creates tabbed navigation, and I find it to be quite useful. Currently, I am trying to figure out how to make a single link select two tabs at once. Essentially, I ...

Tips on successfully transferring a JavaScript variable from PHP to JavaScript

I am struggling with how to manipulate a JavaScript variable in my HTML script and then pass it to a PHP file for incrementing by 1. However, I am unsure of how to return this modified variable back to the HTML file for display. Additionally, I am uncertai ...

Illuminate the current page

I have been working on a website with around 20 pages that all have a side navigation bar. To make it easier to manage, I decided to centralize the links in a JavaScript (JS) file and include it on each HTML page. This way, any changes can be made quickly ...

Differences between Bootstrap 5 gutter and margin

I have a question that I'm struggling to understand. I've been looking at the Bootstrap v5 documentation and noticed a lot of changes from v4, particularly regarding gutters. Could someone please clarify the difference between using gutters and ...

What's the issue with this code not functioning correctly?

puts.php (JSON) { "image":[ { "name":'<div id="yes">Hi!</div>' } ] } process.php <HTML> <HEAD> <TITLE>Process</TITLE> <script type="text/javascript" s ...