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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:48:31+00:00 2026-06-02T20:48:31+00:00

so I have a drop down navigation that appears on hover and I’m trying

  • 0

so I have a drop down navigation that appears on hover and I’m trying to get a delay in there to improve usability. Originally I was using hoverIntent which worked beautifully everywhere except on IE8 and below.

So instead I’m trying to do the delay with plain old Javascript but the setTimeout function won’t call my jQuery.

var J = jQuery.noConflict();

 J(".navigation li").hover(function(){J(this).addClass("hover");},function(){setTimeout("J(this).removeClass('hover');",500);});      

When I set it up like this:

 function off(){J(this).removeClass("hover"); alert("hello");}


J(".navigation li").hover(function(){J(this).addClass("hover");},function(){setTimeout("off()",500);}); 

The alert works perfectly but not the .removeClass function.

Am I missing something?

  • 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-02T20:48:32+00:00Added an answer on June 2, 2026 at 8:48 pm

    this inside setTimeout is not the li element; i recommend you to use setTimeout overload that receives a function, and before set a variable to this to keep a reference:

    J(".navigation li").hover(function(){
       J(this).addClass("hover");
    },
    function(){
      var self = this;
      setTimeout(function() {
             J(self).removeClass('hover');
      },500);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Drop Down navigation that I have created makes the text in li to go
I have a drop-down navigation that brings the user to the page selected in
I put together a simple drop-down navigation that expands when you hover over a
I have a site w/ an image gallery (Portfolio) page. There is drop-down navigation
I have a navigation bar with some nodes that have a drop down menu
I have a drop down navigation that works perfectly when positioned via a left
I have a drop down list that has options that need to be passed
I have a drop down list that triggers an updatepanel when the index is
I have a drop down menu made with Jquery. Right now, if you hover
I have a standard drop-down menu that uses jQuery to hide the children li

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.