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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:11:15+00:00 2026-05-29T12:11:15+00:00

I cannot write Javascript but I have a snippet that I’m adding into a

  • 0

I cannot write Javascript but I have a snippet that I’m adding into a web page. Currently, my code has a mouseover that will reveal a hidden div. However, there is navigation in the hidden div that will immediately disappear as the user tries to click on a link, as the user needs to move their mouse away from the original trigger to reach the navigation.

Here is my Javascript:

<script language="JavaScript">
    function toggle(id) {
        var state = document.getElementById(id).style.display;
            if (state == 'block') {
                document.getElementById(id).style.display = 'none';
            } else {
                document.getElementById(id).style.display = 'block';
            }
        }
</script>

Here is my HTML:

<nav>
    <ul>
        <li class="ovr"><a href="#" onmouseover="toggle('hidden1');" onmouseout="toggle('hidden1');">Overview</a></li>
    </ul>
</nav>


<div class="container">
<div id="hidden1">
    <ul>
        <li><a href="#description">Description</a></li>
        <li><a href="#objectives">Objectives</a></li>
        <li><a href="#semestertopics">Semester Topics</a></li>
        <li><a href="#greenteaching">Green Teaching</a></li>
        <li><a href="#howtodowellinthiscourse">How to Do Well in this Course</a></li>
    </ul>
</div>

If my question has already been answered, a pointer in the right direction would be much appreciated – I don’t have all the right vocabulary to do the correct searches.

Thank you!

  • 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-29T12:11:16+00:00Added an answer on May 29, 2026 at 12:11 pm

    I ended up answering my own question. To keep the hidden div open when the user scrolled over it and to have it disappear again when they no longer needed it, I simply added ‘onmouseover’ and ‘onmouseout’ functions to the hidden divs.

    <div id="hidden1" onmouseover="toggle('hidden1');" onmouseout="toggle('hidden1');>
    

    Thank you for your time!

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

Sidebar

Related Questions

We are working on a JavaScript tool that has older code in it, so
I have found that you cannot chain connects with consistent behavior. In the code
I have external JavaScript file with simple document.write() call. Problem is that a tag
I have a javascript routine that dynamically creates an HTML page, complete with it's
I have some javascript that manipulates html based on what the user has selected.
I wrote this code I have these errors Cannot implicitly convert type x.Program.TreeNode' to
I have my template file which has data being populated into it. However I
I have a PHP array I want to use in my JavaScript code. I'd
I have a header that has a css background image that I want to
I have the following javascript code, which loads without error, however the update function

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.