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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:59:02+00:00 2026-05-26T22:59:02+00:00

With the following code: <html> <head> <script type=text/javascript src=jquery-1.7.js></script> <script language=JavaScript> $(document).ready(function(){ $(‘#cssdropdown li.headlink’).hover(

  • 0

With the following code:

<html>
<head>
    <script type="text/javascript" src="jquery-1.7.js"></script>
    <script language="JavaScript">
        $(document).ready(function(){
            $('#cssdropdown li.headlink').hover(
                function() { $('ul', this).css('display', 'block'); },
                function() { $('ul', this).css('display', 'none'); });
        });
    </script>
</head>
<body>
    <ul id="cssdropdown">
        <li class="headlink">
            <a href="http://google.com/">Search Engines</a>
            <ul>
                <li><a href="http://google.com/">Google</a></li>
                <li><a href="http://yahoo.com/">Yahoo</a></li>
                <li><a href="http://live.com/">Live Search</a></li>
            </ul>
        </li>
        <li class="headlink">
            <a href="http://shopping.com">Shopping</a>
            <ul>
                <li><a href="http://amazon.com/">Amazon</a></li>
                <li><a href="http://ebay.com/">eBay</a></li>
                <li><a href="http://craigslist.com/">CraigsList</a></li>
            </ul>
        </li>
    </ul>
</body>
</html>

I can show a list on mouse over.

I want to show the lists on mouse click instead.
For instance, if I click on Search Engines, the Google, Yahoo and Live Search list will happear.

  • 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-26T22:59:02+00:00Added an answer on May 26, 2026 at 10:59 pm

    Try this:

    $("UL UL").css("display", "none");
    
    $(".title").click(function(e) {
        e.preventDefault();
       $(this).next("UL").toggle();
    });
    

    I’ve added a class of title to each of your clickable items so that the code can be reused.

    Fiddle here

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

Sidebar

Related Questions

I have the following file file: <html> <head> <title></title> <script type=text/javascript src=/Prototype.js></script> <script type=text/javascript>
I have the following code <html> <head> <title>Test</title> <style type=text/css> <!-- body,td,th { color:
Ok, I've got this code: <html> <head> <meta http-equiv=Content-Type content=text/html; charset=iso-8859-1> <script type=text/javascript href=https://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js></script>
I have the following HTML Code <%@ Page Language=C# %> <html> <head> <title></title> </head>
I am using jQuery and Ajax. My MainFile has the following code: <html> <head>
What is wrong with the following htmla and javascript code formToConvert.html <html> <head> <title>ExampleToConvert</title>
I have the following code in html, I cannot get the Function call back
I'm attempting to select all <script type=text/html> tags in a page. I use <script>
In Google Chrome, the following code snippet: <html xmlns = http://www.w3.org/1999/xhtml> <head> <title>Example</title> <script
Consider the following code (includes jQuery): <!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd>

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.