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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:44:31+00:00 2026-05-30T14:44:31+00:00

i am working on a mVc 3 view when i mouse-over on a div

  • 0

i am working on a mVc 3 view when i mouse-over on a div a popup come so there are lot of div’s
when i mouse-over other the popup show there with differ values function is working properly i just want to add delay on the mouse-over 1 second deal without calling other function

//Display a named menu, at the position of another object
function display_menu(parent, named) {
    //get the named menu
    var menu_element = document.getElementById(named);
    //override the 'display:none;' style attribute
    menu_element.style.display = "";
    //get the placement of the element that invoked the menu...
    var placement = findPos(parent);
    //...and put the menu there
    menu_element.style.left = placement[0] + "px";
    menu_element.style.top = placement[1] + "px";
}

//Hide a named menu
function hide_menu(named) {
    //get the named menu
    var menu_element = document.getElementById(named);
    //hide it with a style attribute
    menu_element.style.display = "none";
}
  • 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-30T14:44:33+00:00Added an answer on May 30, 2026 at 2:44 pm

    Add a timeout. First create a variable to hold the timer at the top, like this:

    var timeout = null;
    

    Then update the display_menu parent to operate on a timeout (my comments in the code explain):

    function display_menu(parent, named) {
        // First clear any existing timeout, if there is one
        if (timeout) clearTimeout(timeout);
    
        // Set a timeout to open the menu after 1 second
        timeout = setTimeout(function() {
            // As we open the menu, the timer went off, so clear the timeout variable
            timeout = null;
    
            //get the named menu
            var menu_element = document.getElementById(named);
            //override the 'display:none;' style attribute
            menu_element.style.display = "";
            //get the placement of the element that invoked the menu...
            var placement = findPos(parent);
            //...and put the menu there
            menu_element.style.left = placement[0] + "px";
            menu_element.style.top = placement[1] + "px";
        }, 1000);
    }
    

    Finally, the logic for hide_menu:

    function hide_menu(named) {
        // If a timer is running to open a menu...
        if (timeout) {
            // Nothing has yet been opened, so just stop the timer
            clearTimeout(timeout);
            timeout = null;
        // If there isn't a timer running, it's because we displayed a menu; hide it here
        } else {
            //get the named menu
            var menu_element = document.getElementById(named);
            //hide it with a style attribute
            menu_element.style.display = "none";
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an MVC site using NHaml for the view engine. I
I'm working in an ASP.NET 3.5 MVC application where i've got a view with
When working with web-designers in a Spring-MVC and JSP environment, are there any tools
I'm working on MVC project and i using jQuery in view page to get
I am working on rendering a dynamic form in an ASP.NET MVC view that
I'm working with MVC, I have a view with an ActionLink that calls an
I've a following asp.net mvc razor view code which doesn't seem to be working:
I am working on an MVC application and I have an index view where
I have been working on this MVC 3 Razor app and typically utilize view
Im working on a grid view in asp.net mvc 3 and I need to

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.