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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:01:41+00:00 2026-05-25T01:01:41+00:00

I have the next menu structure. <li class=menu-422><a href=item-1 title=>Item 1</a></li> <li class=menu-444><a href=item-2

  • 0

I have the next menu structure.

<li class="menu-422"><a href="item-1" title="">Item 1</a></li>
<li class="menu-444"><a href="item-2" title="">Item 2</a></li>
<li class="menu-449"><a href="item-3" title="">Item 3</a></li>
<li class="menu-452"><a href="item-4" title="">Item 4</a></li>

In this structure the items (the a-tag) have background. I want to change the background of the next item on hover event. If I’m over the Item 2 I want to change the background of the Item 3. I tried it with jQuery, but I didn’t find the appropriate code.

jQuery("#mymenu li a").hover(function() {
  jQuery(this).next("li a").css('background', 'none');
}

I tried it with nextAll, with full selector path, but I can’t select the next element.

  • 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-25T01:01:42+00:00Added an answer on May 25, 2026 at 1:01 am

    Upon hover, you want to go up to the parent li, then use next() to get to the next li, then find('a') inside of that li:

    $("#mymenu li a").hover(function() {
        $(this).parent().next().find("a").css('background', 'none');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a triangle next to menu items, using pure CSS. It works flawlessly
I have this menu in a partial: <ul id="submenu"> <li><a href="/mypage/profile/<%=user[0].id %>">Profile</a></li> <li><a href="/mypage/test/<%=user[0].id
I have a menu structure that outputs a list of favourite configuration items. In
Next to file menu i want to add a search menu that will have
I have next interface public interface IMyInterface { string this[string key] { get; set;
I have next tables Order , Transaction , Payment . Class Order has some
I have next code require 'rack/rpc' class Server < Rack::RPC::Server def hello_world Hello, world!
I have this drop down menu that when one menu is clicked if there
I have a menu that contains submenus. Its HTML source looks like this: <ul
I am trying to get an image to appear next to a menu item

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.