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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:56:32+00:00 2026-05-17T21:56:32+00:00

I have a panel hide/show setup that is triggered from a list item anchor.

  • 0

I have a panel hide/show setup that is triggered from a list item anchor. Works great. The problem is, I also have a dropdown menu in the site navigation that also needs to trigger each panel, from any page on the site. Like say, I have panels (in this order), “Hardware”, “Software”, “Accessories” on the Products page. So when I’m on the About page, and I click “Software”, the expected result is to take me to the Products page and have the “Software” panel open. Here’s my jquery script for the panel:

$("ul#product-type li a").click(function() {
$("ul#product-type li").removeClass("selected");
$(this).parent().addClass("selected");
var currentTab = $(this).attr("href");
    $("div.panel").hide();
    $(currentTab).show();
return false; });

Dropdown Nav Markup:

<ul id="nav">
<li><a href="/products/#hardware"><span>Hardware</span></a></li>
<li><a href="/products/#software"><span>Software</span></a></li>
<li><a href="/products/#accessories"><span>accessories</span></a></li>

I’ve tried adding the nav selector to the click function, but that doesn’t work. Any ideas or suggestions would be hugely appreciated.

Cheers,
Ryan

  • 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-17T21:56:33+00:00Added an answer on May 17, 2026 at 9:56 pm

    The href isn’t a valid selector, since $("/products/#hardware") wouldn’t work. However using the .hash property is perfect, as you’ll get $("#hardware"). Use it like this:

    $("ul#product-type li a").click(function() {
      $("ul#product-type li").removeClass("selected");
      $(this).parent().addClass("selected");
      $("div.panel").hide();
      $(this.hash).show();
      return false; 
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to solve this problem: I have the following set of divs that when
when i add the enter from the CMS admin panel then add the data
I have a custom search panel, which is a part of main layout. Most
I have some jQuery tabs set up on the right of the page, however
Let's say I have a rolegroup as follows: <asp:LoginView ID=lvDoSomeStuff runat=server> <RoleGroups> <asp:RoleGroup Roles=RoleOne,RoleTwo>
I have an image map with some clickable areas, and the plan is to
I want to hide the title <controls:Panorama Title=myTitle Style={StaticResource customStyle}> in landscape mode I
I want to implement video panel in android in which i want to create
In the XAML provided below, I don't have the value for Phone sometimes. When
I'm working on a portfolio site for an iPhone developer. In this site the

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.