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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:01:19+00:00 2026-05-21T20:01:19+00:00

<tr> <td class = edit edit_c1>C1</td> <td>C2</td> <td class = edit edit_c3>C3</td> <td>C4</td> <tr>

  • 0
<tr>
  <td class = "edit edit_c1">C1</td>
  <td>C2</td>
  <td class = "edit edit_c3">C3</td>
  <td>C4</td>
<tr>
<tr>
  <td class = "edit edit_c1">C1</td>
  <td>C2</td>
  <td class = "edit edit_c3">C3</td>
  <td>C4</td>
<tr>

I have some Jeditable code that runs on “.edit_c1, edit_c2 etc”. I want to traverse to the next editable column on TAB. I have another class “edit” to identify editable columns. I am assuming nextall() should work but none of the options below gets me the handle to the next editable column (TD with class = “edit”).

$(".edit").keypress(function (event) {
                var td = $(this).closest('td');
                console.log(this);
                // returns <td class="edit edit-c1" style="white-space:nowrap">
                switch (event.keyCode) {
                    // TAB   
                    case 9:
                        console.log("TABBED");
                        console.log($(this).closest('td').next('td[@class=edit]'));
                        //Above logs [td] a handle to C2 instead of C3
                        console.log($(this).closest('td').nextAll(':has(.edit):first').find('.edit'));
                        //Above logs []
                        console.log($(this).nextAll(':has(.edit):first').find('.edit'));
                        //Above logs []
                        console.log($(this).closest('td').next().find('.edit'));
                        //Above logs []
                        break;
                }
            });

The code does work to a point where I see the console.log messages in firebug. Jeditable portion of the code below.

            $('.edit-c1').editable(function (value, settings) {
                var tr = $(this).closest('tr'),
                id = tr[0].id;
                //comment the line below if you want to test
                //saveWSField(id, value, "C1");
                return (value);
            }, {
                type: 'text',
                onblur: 'submit'
            });
  • 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-21T20:01:20+00:00Added an answer on May 21, 2026 at 8:01 pm

    I haven’t looked in too much detail at what jeditable injects into the DOM to make things editable, but it seems to inject a small form.

    With this in mind, the following works for me:

    html

    <table>
        <tbody>
            <tr>
                <td class = "edit edit_c1"><form><input type="text" value="C1" /></form></td>
                <td>C2</td>
                <td class = "edit edit_c2"><form><input type="text" value="C3" /></form></td>
                <td>C4</td>
            </tr>
            <tr>
                <td class = "edit edit_c1"><form><input type="text" value="r2C1" /></form></td>
                <td>C2</td>
                <td class = "edit edit_c2"><form><input type="text" value="r2C3" /></form></td>
                <td>C4</td>
            </tr>
        </tbody>
    </table>
    

    Then the following javascript:

    $(".edit").keypress(function(event) {
        var td = $(this).closest('td');
        console.log(this);
        switch (event.keyCode) {
            // TAB   
        case 9:
            console.log("TABBED");
            console.log($(this).html());
            var $ntd = $(this).nextAll('.edit');
            if ($ntd.length === 0) {
                console.log($(this).parent().nextAll('tr').html());
                $ntd = $(this).parent().nextAll('tr').children('td.edit').first();
            }
            // $ntd should hold what we need
            console.log($ntd.html());
            break;
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write some metaprogramming code such that: Inheriting from some class foo<c1,
What does a WCF Service Library do that a regular class library doesn't? Edit:
For edit home status of category I have a link: <span class=\ha\ title=\Active in
I have a data structure in my C++ program that has some attributes of
So I have a class that creates a table to be populated with data.
This is a simplified version of a class that I have in my project.
I have the following code: #include <iostream> class Grandma { public: virtual void foo()
I have an annoying message box that pops up when I dont want it.
I have the following question regarding the code below: public class GenericBridgeMethods <T> {
the last thing I want to minimize today is code that contains while and

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.