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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:42:59+00:00 2026-05-11T15:42:59+00:00

I have an unordered list, which has maybe 30 items. When one of these

  • 0

I have an unordered list, which has maybe 30 items. When one of these items are hovered over, the rest of the list items fade to 30% and the hovered item stays at 100%; when you move away from the list, they all fade back up to 100% and I have managed this.

My problems arises when you move from item to item, the other list items fade back up to 100% and then back down to 30%. I want them to stay at 30% unless the user moves away from the whole list.

I use the hoverIntent plugin on each list item. I also used jQuery to add a class to the current list item, so I could then fade the rest and remove it once you move away. I have used a wait function found on the jQuery Cookbook site (http://docs.jquery.com/Cookbook/wait)

Do you get me?

Here’s my code so far:

$.fn.wait = function(time, type) {     time = time || 300;     type = type || 'fx';     return this.queue(type, function() {         var self = this;         setTimeout(function() {             $(self).dequeue();         }, time);     }); };  $('#sites li:not(#sites li li)').hoverIntent(function(){     $(this).attr('class', 'current'); // Add class .current     $('#sites li:not(#sites li.current,#sites li li)').fadeTo('slow', 0.3); // Fade other items to 30%     },function(){     $('#sites li:not(#sites li.current,#sites li li)').wait().fadeTo(600, 1.0); // This should set the other's opacity back to 100% on mouseout     $(this).removeClass('current'); // Remove class .current }); 

*Obviously this is within a $(document).ready(function()

Can anyone help me please?

Many thanks

  • 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. 2026-05-11T15:43:00+00:00Added an answer on May 11, 2026 at 3:43 pm

    This sounded like fun, so I implemented it. From the looks of things, your css selector can be simplified. I think you only want the topmost list item to fade in and out, but it’s not clear from the example. This example highlights the topmost node and does the fading correctly. I think this is the effect you were going for, but I’m not 100% sure. I didn’t use the wait() functionality, as I’m not sure what it does do you.

    Essentially, it sounds like the problem you are running into is that you are fading items in on hover out when you haven’t left the list yet. You only want to fade in the list or other list items when you’ve entirely left the list. Don’t use hoverIntent for that part, and handle the fading on the entire unordered list and it should be good to go.

    The example: http://jsbin.com/usobe

    Tinker with the example: http://jsbin.com/usobe/edit

    <ul id='sites'>   <li> site 1    <ul><li>sub item 1</li><li>sub item 2</li><li>sub item 3</li></ul>   <li> site 2    <ul><li>sub item 1</li><li>sub item 2</li><li>sub item 3</li></ul>     <li> site 3      <ul><li>sub item 1</li><li>sub item 2</li><li>sub item 3</li></ul>   <li> site 4    <ul><li>sub item 1</li><li>sub item 2</li><li>sub item 3</li></ul>     <li> site 5 </ul>      <script> $(function() {  $('#sites').hover(      function() {},       function() {                $('#sites>li').fadeTo('fast', 1.0);       } );  $('#sites>li').hoverIntent(     function(){        $(this).attr('class', 'current'); // Add class .current        $(this).siblings().fadeTo('fast', 0.3); // Fade other items to 30%        $(this).fadeTo('slow', 1.0); // Fade current to 100%      },     function(){                   $(this).removeClass('current'); // Remove class .current       $(this).fadeTo('fast', 1.0); // This should set the other's opacity back to 100% on mouseout        }); });  </script> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an unordered list which contains several items called 'oListItems' the UL has
I have a page which has an unordered list down one side, to switch
I have an unordered list and each of the item in the ul has
I have an unordered list, each list item has an id (id=6~OriginalName) - when
I have an unordered list <ul> with list items <li> which I'd like to
I have unordered list which has bulleted text within. I need to indent the
I have a nested unordered list which has main content on the left, and
I have a several pages which has the same ul (unordered list) with the
I have an unordered list I'm using for a menu. Each item has a
i have an unordered list of horizontal/vertical segments of length 1, which build one

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.