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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T18:39:33+00:00 2026-06-16T18:39:33+00:00

I have recreated my menu here: http://jsfiddle.net/bVQ2H/2/ As you can see, it has a

  • 0

I have recreated my menu here: http://jsfiddle.net/bVQ2H/2/
As you can see, it has a drop-down menu, and what I was trying to do was to add a class when mouse is over that dropdown menu & “More” button, basically this class should be added to the “li” element that contains the dropdown menu and “More” button.

The delay, before the “focusedmenu” class dissappears, should be kept.

I can use only Mootools, NO jQuery.

Any idea how I can achieve it?

JS Code

window.addEvent('domready', function() {
  var timer;
  $$('li.submenu_explore').addEvents({
    mouseenter: function(){
      $$('li.submenu_explore').addClass('focusedmenu');
    },
    mouseleave: function(){
      timer = function(){ $$('li.submenu_explore').removeClass('focusedmenu'); }.delay(1000);
    }
  });
});

HTML Code:

<div class="layout_core_menu_main">
  <ul id="navigation">
      <li><a href="#">Albums</a></li>
      <li><a href="#">Blogs</a></li>
      <li><a href="#">Classifieds</a></li>
      <li class="submenu_explore">
        <a href="javascript:void(0);" id="submenu_toggle">More</a>
        <ul>
          <li><a href="#">Groups</a></li>
          <li><a href="#">Videos</a></li>
          <li><a href="#">Music</a></li>
        </ul>
    </li>
  </ul>
</div>

CSS Code:

/*
MAIN MENU
*/
.layout_core_menu_main
{
  height: 38px;
  border: 1px solid #000;
  background: #111;
}
.layout_core_menu_main > ul
{
  width: auto;
  margin: 0px auto 0px auto;
  position: relative;
}
.layout_core_menu_main > ul > li
{
  float: left;
}
.layout_core_menu_main > ul > li > a
{
  font-size: 12px;
  font-weight: bold;
  line-height: 38px;
  outline: none;
  display: inline-block;
  padding: 0px 16px;
  position: relative;
  border-right: 1px solid #000;
}
.layout_core_menu_main > ul > li > a:link, .layout_core_menu_main > ul > li > a:visited
{
   color: #EEE;
   text-decoration: none;
}
.layout_core_menu_main > ul > li > a:hover, .layout_core_menu_main > ul > li:hover > a
{
  color: #FFF;
  font-weight: bold;
  text-decoration: none;
  background: #000;
}
.layout_core_menu_main > ul > li.active > a, .layout_core_menu_main > ul > li > a:active, .layout_core_menu_main > ul li.focusedmenu > a
{
  background: #000;
  color: #FFF;
  font-weight: bold;
  text-decoration: none;
}


/*
Submenu for MAIN MENU
*/
.layout_core_menu_main > ul > li > ul
{
  margin-top: 1px;
}
.layout_core_menu_main > ul > li:hover > ul, .layout_core_menu_main > ul li.focusedmenu ul
{
  display: block;
}
.layout_core_menu_main ul ul
{
  display: none;
  position: absolute;
  right: 0px;
  z-index: 1;
  background-color: #EEE;
  border: 1px solid #AAA;
  width: 200px;
  padding: 5px 0px;
  font-size: 12px;
  font-weight: bold;
}
.layout_core_menu_main ul ul li
{
  font-weight: bold;
}
.layout_core_menu_main ul ul li a
{
  display: block;
  padding: 0px 10px;
  line-height: 26px;
  text-align: left;
  color: #555;
  text-shadow: 1px 1px 0px #FFF;
  outline: none;
  text-decoration: none;
}
.layout_core_menu_main ul ul li a:hover, .layout_core_menu_main ul ul li.active > a
{
  color: #333;
  background: #FFF;
  text-decoration: none;
}
li.submenu_explore
{
  position: relative;
}
li.submenu_explore > a
{
  background: #000;
}
  • 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-06-16T18:39:35+00:00Added an answer on June 16, 2026 at 6:39 pm

    Adding a delay to your mouseenter event appears to provide a workaround.

    mouseenter: function(){
      timer = function(){ 
        $$('li.submenu_explore').addClass('focusedmenu'); 
        $$('#Output').set('html',$$('li.submenu_explore').hasClass('focusedmenu'));                        
      }.delay(1000);
    }
    

    Working Example: http://jsbin.com/uvoxiq/5/edit

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

Sidebar

Related Questions

I have a question that has pretty much been asked here: asp.net mvc Html.ActionLink()
I have a streaming input which has repeated values. I can use any data
Hello have following strange issue, can vertical center the menu text if it's one
I have been given a psd of a nav menu and im trying to
I have recreated the Predicatebuilder class in a seperate C# project and I'm trying
I took some sample code to create a drop down menu from this website:
require('fortunes') fortune('106') Personally I have never regretted trying not to underestimate my own future
I have a table of 3 columns: AuthorID (id can be repeated) JournalName (name
Here's the situation: You have a very complex UI element that is repeated in
I am trying to ignore some files that I have already committed to the

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.