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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:28:10+00:00 2026-06-14T04:28:10+00:00

i have incorporated a show and hide function on my site Click here –

  • 0

i have incorporated a show and hide function on my site Click here – click on the work tab and contact us tab one thing i have noticed this the trigger to hide the hidden div does not work the way i want it to work. For example when you click on the work tab the click on the contact us tab the work hidden div close and vise versa. Does anyone know how i can achieve this.

Here’s my HTML:

 <ul class="nav-bar">
 <li><a class="show_hide" href="#">work</a></li>
 <li><a class="show_hide-2" href="#">contact us</a></li>
 </ul> 

Here’s my JS

$(document).ready(function(){

    $(".slidingDiv").hide();
    $(".show_hide").show();
    $('.show_hide').click(function(){
    $(".slidingDiv-2").hide();
    $(".slidingDiv").slideToggle();
       });


$(".slidingDiv-2").hide();
$(".show_hide-2").show();
$('.show_hide-2').click(function(){
$(".slidingDiv").hide();
$(".slidingDiv-2").slideToggle();
 });
 });

Also I have added display:none; to show_hide and show_hide-2 however there is a still a slight animation when you load the site, is there a way to work around this?

  • 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-14T04:28:11+00:00Added an answer on June 14, 2026 at 4:28 am

    Change it to:

    $('.show_hide').click(function(){
        $(".slidingDiv-2").hide();
        $(".slidingDiv").slideToggle();
    });
    

    And

    $('.show_hide-2').click(function(){
        $(".slidingDiv").hide();
        $(".slidingDiv-2").slideToggle();
    });
    

    You can set the CSS (or inline in the HTML) of the divs to display:none; to hide the divs before the Javascript takes effect, when the page loads.

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

Sidebar

Related Questions

According to http://www.assembla.com/wiki/show/scala-ide/Troubleshooting in order to have the Scala Eclipse plugin to work with
I have one php function that receives drop down variables through javascript. The variables
I have incorporated jCarouselLite with my already working site, however the PREV and NEXT
I have a worldmap.swf, were I have incorporated a small logo in any continent,
After reading some articles about XSS I have incorporated HTMLPurifier into my zend framework
I have made a custom formwizard and incorporated it into my admin interface. Basically
I am trying to incorporate my pin feed into my site. I have got
I have tied this jQuery Bar Graph plugin with a function that I created.
I'm very new to namespace and global variables. I presently have this code: $('#formats1').hover(function()
I have incorporated the fb:fan control onto my web page. The problem I have

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.