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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:37:11+00:00 2026-05-28T07:37:11+00:00

I am trying to target the <li> s from a <ul> and give them

  • 0

I am trying to target the <li>s from a <ul> and give them a hover event.

Unfortunately the <li>s contain some other <div>s that are positioned outside the <li> itself.

The problem occurs that the .hover() event fires when I hover on the child <div>s since DOMwise they are children, even though design/geometry-wise the seem like a diffent element totally.

Is there any way, or any other event that I can use for when the cursor runs over the <li> itself and NONE of it’s sub-elements?

Thanks in advance.

  • 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-28T07:37:12+00:00Added an answer on May 28, 2026 at 7:37 am

    Is this for a style change?
    If so try using CSS pseudo events instead of jQuery, e.g.:

    li:hover
    {
      background-color:yellow;
    }
    

    Alternatively, use e.stopPropagation(), e.g.:

    $(document).ready(function(){
        $(".parent").click(function(){
            // do whatever;
        });
        $(".child").click(function(e) {
             e.stopPropagation();
        });
    });
    

    Unfortunately I don’t think this works with hover, but it does with mouseover and mouseout, which is what hover basically uses.

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

Sidebar

Related Questions

I'm basically trying to get the target element from event.target and if not equal
I am trying to invoke an ANT target from Windows (right-click) file context menu.
So I am trying to store the result from a render target into an
I'm trying to get a target to build that has quite a long list
Hi I am trying to connect Oracle 10g(Source/Target) from ssis using connection string as
I am trying to migrate data from one table to other. The issue is
I'm trying to cross-compile a simple java example for ARMv7 target from command line.
I am currently trying to decompress some data that I have coming in with
I am trying to convert some matlab code from the Maia package into something
I'm trying to target a price on a website using an importXML from Google

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.