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

  • Home
  • SEARCH
  • 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 3353266
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:07:50+00:00 2026-05-18T02:07:50+00:00

I am using: Event.observe(window, ‘load’, function() { $$(‘li’).invoke(‘observe’, ‘mouseover’, function(event) { this.children[0].toggle(); }); $$(‘li’).invoke(‘observe’,

  • 0

I am using:

    Event.observe(window, 'load', function() {  
$$('li').invoke('observe', 'mouseover', function(event) {
    this.children[0].toggle();
});

$$('li').invoke('observe', 'mouseout', function(event) {
    document.children[0].toggle();
});
    });   

<ul>
  <li>
    <div style="display:hidden;">Hidden Div</div>
    <div>More content that isn't hidden</div>
  </li>
</ul>

To display a hidden div within an element when that element is moused over. It is partially working, however my code looks like the following:

When I rollover the li it displays the hidden div, however if I rollover the second div it hides the comment again, even though this div is in the li. Why? I found this questions, but it doesn’t seem to work either for this context.

  • 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-18T02:07:50+00:00Added an answer on May 18, 2026 at 2:07 am

    No need to use prototype or javascript for this, use css

    li.item:hover div.entry {
     display:block
    }
    
    li.item div.entry {
     display:none
    }
    

    you don:t use any css classes in your example code, but I would strongly recommend you do so for this case

    <ul>
      <li class="item">
        <div class="entry">Hidden Div</div>
        <div>More content that isn't hidden</div>
      </li>
    </ul>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to reload an entire frameset using Javascript onload() event? function
Using instance methods as callbacks for event handlers changes the scope of this from
I am using Delphi TApplication.OnException Event to catch unhandled exceptions This works well but
I'm using Jquery's toggle event to do some stuff when a user clicks a
I'm using the StAX event based API's to modify an XML stream. The stream
Windows Form I'm using the DragOver event on a layoutpanel and the DragEventArgs returns
I have a .Net console App which using a scheduled event will start, call
Using jQuery, how do you bind a click event to a table cell (below,
We're using Microsoft.Practices.CompositeUI.EventBroker to handle event subscription and publication in our application. The way
How can I detect keyboard event in C language without using third party libraries?

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.