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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:58:00+00:00 2026-05-29T08:58:00+00:00

I cannot write Javascript code yet, and I’m trying to edit some code that

  • 0

I cannot write Javascript code yet, and I’m trying to edit some code that toggles divs to be invisible/visible. Currently, it will reveal the div when the user clicks on the link – however, I’d like the hidden div to become visible on a mouseover instead.

Here is the Javascript code:

<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 the HTML it is linked to:

<nav>   <ul>
        <li class="ovr"><a href="#" onclick="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>

Thank you very much for helping! If I’ve posted a question that’s already been answered, I’d be very grateful if someone could point me in the right direction – I don’t have all the vocabulary to properly search for an answer.

  • 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-29T08:58:00+00:00Added an answer on May 29, 2026 at 8:58 am

    Use the onmouseover event to activate the “show” toggle.

    http://www.w3schools.com/jsref/event_onmouseover.asp

    <div id="hidden1" onmouseover="toggle('hidden1')">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

we currently experience some file writing/encoding problems that we cannot reproduce. Actually there are
I cannot write Javascript but I have a snippet that I'm adding into a
I'm trying to write some code which replaces old content with a placeholder while
0x80040237 Cannot insert duplicate key. I'm trying to write an import routine for MSCRM4.0
I am trying to write my thesis in latex... Cannot get the layout straight
I'm trying to write a suggestion search box and I cannot find a solution
We are working on a JavaScript tool that has older code in it, so
I am trying to write a very simple slide up and slide function that
I have a JavaScript code that is capturing mouse co-ordinates(X, Y and timestamps) from
I tend to write my javascript as big blocks of code without many variable

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.