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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:10:35+00:00 2026-05-18T10:10:35+00:00

I have a table I’m using jQuery UI’s sortable on. In the table, I

  • 0

I have a table I’m using jQuery UI’s “sortable” on. In the table, I have rows consisting of a “drag handle” to grab and reorder the table, and cells with clickable items, like this:

<table id="test-table">
    <tbody>
    <tr>
        <td class="handle"><div class="ui-icon ui-icon-arrowthick-2-n-s" /></td>
        <td class="clickycell"><a href="#">Testing 1</a></td>
    </tr>
    <tr>
        <td class="handle"><div class="ui-icon ui-icon-arrowthick-2-n-s" /></td>
        <td class="clickycell"><a href="#">Testing 2</a></td></td>
    <tr>
        <td class="handle"><div class="ui-icon ui-icon-arrowthick-2-n-s" /></td>
        <td class="clickycell"><a href="#">Testing 3</a></td></td>
    </tr>
    </tbody>
</table>

In my code, I make the table sortable, and also use jQuery’s live() to bind a click event to the clickable items, like this:

$(function() {
    /*
       Using live() because in my real code table rows are dynamically added.
       However, if I use click() instead, as in the commented-out code, it works
       fine, without any need to click twice.

    */
    // $(".clickycell a").click(function() {
    $(".clickycell a").live('click', function() {
        alert("Successful click");
        return false;
    });
    $("#test-table tbody").sortable({
        handle: "td.handle", /* Use the draggy handle to move, not the whole row */
        cursor: "move"
    });
});

I’m using live() because rows can be dynamically added to the table in the real code.

My problem is this: if I click on any of the clickable items before sorting, they work fine. After the user drags the rows to reorder them, though, I have to click twice for a click to register. After that second click, the clickable items go back to “normal”, needing only one click, until the next time rows are dragged around.

If I use click() rather than live() — as in the commented-out code — then a single-click works fine at all times, but I’d rather use live(), as I said. And I’m curious as to why it’s not working.

There’s a live jsFiddle example here. Try dragging a row into a different position, then clicking on any of the “Testing…” links. In Firefox, at least, I need to click twice to get the “Successful click” alert.

Any ideas?

  • 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-18T10:10:36+00:00Added an answer on May 18, 2026 at 10:10 am

    It’s unfortunate to end with the answer “It is a bug,” but I guess sometimes that happens. Maybe I’ll dust off my GitHub login and fork it to see if I can track it down and discover a fix.

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

Sidebar

Related Questions

I have table with around 70 000 rows. There is 6000 rows that i
I have table in which I am inserting rows for employee but next time
I have table of over 4 million rows and accidentally in one column there
I have table that contains more than 12 millions of rows. I need to
I Have Table with multiple columns and rows, Example, <table> <thead> <tr> <th>Head 1</th>
I have table inside a div tab. The table has 40 rows in it
I have table rows of data in html being filled from a CGI application.
I have table with more than 3 000 000 rows. I have try to
I have table cells with attributes data-position-x and data-position-y with integer values. I want
I have table with millions of records (rows). And in this table there is

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.