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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:10:52+00:00 2026-05-26T13:10:52+00:00

I found a blog post on creating the menu found in gmail with css

  • 0

I found a blog post on creating the menu found in gmail with css dropdown.

The dropdown is displayed when we hover over the buttons but I want to convert this to a jQuery menu

where the dropdown is displayed when we click on a button rather than on mouseover, Please help.

Thanks in advance .

http://jsfiddle.net/PSUkW/

  • 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-26T13:10:52+00:00Added an answer on May 26, 2026 at 1:10 pm

    It’s really simple logic. I replaced a few of the :hover CSS rules with a .clicked class and added this JS:

    $('.menu > ul > li').click(function() {
        $(this).siblings().removeClass('clicked');
        $(this).toggleClass('clicked');
    });
    

    Instead of allowing the browser to trigger the dropdown with the :hover pseudo class, I have jQuery toggle the class .clicked on each top-level li clicked. This produces the same behavior, but with JS.

    This line:

    $(this).siblings().removeClass('clicked');
    

    Basically removes the clicked class from the siblings of that element, which allows the user to drop down only one menu at a time (otherwise overlap occurs).

    Demo: http://jsfiddle.net/PSUkW/5/

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

Sidebar

Related Questions

Been searching but the only thing I found was http://evain.net/blog/articles/2009/07/30/rebasing-system-reactive-to-the-net-clr which I got to
I found an interesting blog post about Go. I am trying to understand the
I have googled and googled around for this and found the blog post from
I'm now writing my first jQuery Plugin and i found this blog post about
I am using the script found at this blog post . What I am
I've recently found this blog entry on a tool that writes XSS attacks directly
EDIT 9-3-10: I found this blog entry recently that was very enlightening. http://optimizermagic.blogspot.com/2007/12/outerjoins-in-oracle.html There
Every LINQ blog I found there seemed around 2 years old, I understand the
In Moritz Haarmann's Blog I found an example of usage of Bonjour by Java
Using this xslt file found on this blog to pretty print xml using Nokogiri,

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.