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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:15:03+00:00 2026-06-13T14:15:03+00:00

When i use the following to register a handler for click events: $(‘.drilldown-action >

  • 0

When i use the following to register a handler for click events:

$('.drilldown-action > li').live('click', function(event){
    drilldown.loadActions($(event.target));
});

With HTML:

<ul class="drilldown-action">
    <li data-action="Dummy"><a href="#">Dummy</a> Dum</li>
</ul>

In the browser ( using Chrome ) I click on the a tag, how can i get the jQuery object that the event was registered on? I expect the li element to be the event target, as that is what i put in the selector. I know i can just use .parent() for this case, but is there a way to get the object that matched the selector, instead of the bottom event target? Also using .parent() is a pain because when the other part of the li is clicked, i wouldn’t have to need to use it.

  • 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-13T14:15:04+00:00Added an answer on June 13, 2026 at 2:15 pm

    e.target is the link tag.

    You should use this to get li tag that is the element bound to the handler.

    Code:

    $('.drilldown-action > li').live('click', function(event){
        drilldown.loadActions($(this));
    });
    

    Note: As of jQuery 1.7, the .live() method is deprecated. Use .on() to attach event handlers. Users of older versions of jQuery should use .delegate() in preference to .live().

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

Sidebar

Related Questions

I currently use the following function to register a dll that handles context menu
I have a function that I want to use as an event handler: void
I want preserve original value of target field and use json_decode to use following
I use the following types to create a new function at runtime: typedef int
I have the following code I use to simulate a live data feed which
I've got the following route: register_invitecode: url: /register/:invitecode param: { module: home, action: register
I use following style attribute so when i will start typing in text box
I use following code: Create a retry policy, when error, retry after 1 second,
I just use following code to add an image to my project, var paper
When i use following: var child:DisplayObjectContainer = dso.getChildAt( dso.numChildren -1 ) as DisplayObjectContainer; trace(child);

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.