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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 298k
  • Answers 298k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer That code is very old. The current repository of Rhino.Commons… May 13, 2026 at 7:25 pm
  • Editorial Team
    Editorial Team added an answer An old ODBC driver may not support unicode. It was… May 13, 2026 at 7:25 pm
  • Editorial Team
    Editorial Team added an answer Yup, there's the convert_tz function. May 13, 2026 at 7:25 pm

Related Questions

Simplified for example, I have two tables, groups and items . items ( id,
In this simplified example I have a generic class, and a method that returns
This is a simplified version of a query I have. Say for each customer
A simplified version of problem I am experiencing: Here is my HTML form: <form
As a simplified example, I have the following data classes: public class Employee {

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.