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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:58:51+00:00 2026-05-13T13:58:51+00:00

simplified, i’ve got following code: <a id=123 href=#><span>click</span><span>me</span></a> when i click on ‘click’ and

  • 0

simplified, i’ve got following code:

 <a id="123" href="#"><span>click</span><span>me</span></a>

when i click on ‘click’ and ‘me’ it doesnt seem to work with following jquery selector:

 $("a").click...

maybe its because i click on the children? how could i write the selector so it maps to all children in ‘a’?

  • 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-13T13:58:51+00:00Added an answer on May 13, 2026 at 1:58 pm

    [updated]
    The problem is that you are using the wrong tool for the job (namely the event.target property). This will return the element that the event happened on.. but not the element in the bubbling phase that handles the event… you need to use the event.currentTarget..
    But in jQuery’s case this is also the same as the this keyword inside the handler …
    ref: http://api.jquery.com/event.currentTarget/

    Have a read at the Event order as explained at quirksmode. Special attention to Use of event bubbling and currentTarget


    [previous answer]
    Make sure that inside the .click method you use a function pointer or an anonymous function ..

    so

    $("a").click( function() {/*...*/} ); // anonymous function
    

    or

    function some_function()
    {
    //...
    }
    $("a").click ( some_function ) // function pointer
    

    but not

    $("a").click ( some_function() ) // unless some_function returns a function pointer..
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following simplified code doesn't work (because it sets the retrieved object reference to
I have the following (simplified) code periodically run by a Thread in the class
My simplified and contrived example is the following:- Lets say that I want to
Simplified from this question and got rid of possible affect from LinqPad(no offsensive), a
Simplified, I have to solve the following problem: You have a 2-dimensional array filled
This is a simplified version of Netbeans PHP Code completion failing me, or am
I have the following simplified XML source: <?xml version=1.0 encoding=UTF-8?> <MVKE> <item> <MANDT>025</MANDT> <MATNR>000000000000000551</MATNR>
Simplified repeated code for each entity type is public IList<entity1> GetEntity1(.. query params ..)
Here is a simplified version of the code I'm working on. main :: IO
i have the following (simplified) domain classes class Filter { String name static hasMany

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.