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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:25:46+00:00 2026-06-15T12:25:46+00:00

Why would this work : $(document).on(dblclick, #areaA tr:has(td), function(e) { //code here }); and

  • 0

Why would this work :

$(document).on("dblclick", "#areaA tr:has(td)", function(e) {
     //code here
 });

and this does not

$("#areaA tr:has(td)").on('dblclick', function(e) {
    //Code here
});

I’m following the example on the jquery documentation page exactly, but my double click does not fire. When I do it the first way, it works, but seems like it fires the event twice.

This is in the context of a Kendo UI grid.

Is there really a difference between these two pieces of code?

  • 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-15T12:25:47+00:00Added an answer on June 15, 2026 at 12:25 pm

    The main difference is that the condition in the first one will be checked each time you click. So if the element with id areaA or the tr or td inside is added dynamically, only the first one can work.

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

Sidebar

Related Questions

I wonder why F-Sharp doesn't support infinity. This would work in Ruby (but not
I thought this would be fairly simple but it turns out not to work
Possible Duplicate: The current element as its Event function param Would this work <script
Can anyone see why this would work in FF but not Safari? When I
I thought this would be pretty simple, but guess not. I have the following
In FireFox I have this jQuery at the end of the body: $(document).ready(function() {
Im using the jQuery noConflict method here: http://drupal.org/node/1058168 Now, both of the following work:
Somehow, my code does not work. I can't figure out why, I'm completely new
Why would this work timeout 10s echo foo bar # foo bar but this
I'd like to enable SVNAutoversioning for one repository only. Would this work? <Location /repos/>

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.