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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:13:03+00:00 2026-05-29T04:13:03+00:00

I use jQuery together with the dataTables Plugin. dataTables provides a feature to open

  • 0

I use jQuery together with the dataTables Plugin.
dataTables provides a feature to open and close a row (means that an additional info-row can be opened under a regular row).

From http://datatables.net/api i got following well working example:

$(document).ready(function() {
    var oTable;

    // 'open' an information row when a row is clicked on
    $('#example tbody tr').click( function () {
        if ( oTable.fnIsOpen(this) ) {
            oTable.fnClose( this );
        } else {
            oTable.fnOpen( this, "Temporary row opened", "info_row" );
        }
    } );

    oTable = $('#example').dataTable();
} );

Now I want to add the click handler not to the whole row, but to a element in the row:

$("#openCompliantsTable .icon-comment").click(…

But of course this now does not refer to the tr element but to some child element. My attempt to change the code was to replace this with $(this).parent().parent().get(), which did not work.

Then i found out that actually this seems not to be the same as $(this).get(), even if both are [object HTMLElement] objects, which surprised me.

Any suggestions to get this working?

EDIT:
My HTML table looks like this:

<table id="openCompliantsTable" class="table table-striped table-bordered table-condensed">
    <thead>
      <tr>
        <th>Reklamationsnummer</th>
        <th>Reklapositionsnummer</th>
        ...
        <th>Status</th>
        <th>Aktion</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>1</td>
        <td>1</td>
        ...
        <td>offen</td>
        <td><i class="icon-ok"></i><i class="icon-trash"></i><i class="icon-flag"></i><i class="icon-comment"></i></td>
      </tr>
      ...
    </tbody>
  </table>
  • 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-29T04:13:03+00:00Added an answer on May 29, 2026 at 4:13 am

    .get() without parameters returns an array with all the DOM element of all the matched elements. Even if you have only one matched element, you’ll get an array with one item.

    With an index, .get() will retrieve a single element, which is you’re after.

    You have to use:

    $(this).parent().parent().get(0)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use the JQuery tools tooltips plugin in a site that I'm
I use jQuery Validation plugin to ensure what user entered positive cost_of_car in first
I use jquery pagination plugin for paging... If there is one pagination plugin there
I am trying to use jquery validator plugin and form submit via ajax in
I've got an input like so: I'd like to use jQuery to grab that
I use prototype.js and jquery together and I get this error message Uncaught TypeError:
Is there any way to use both the jquery and scriptaculous js files together?
I'm putting together a new app and, while I normally use JQuery for things
In this article , Dave Ward describes how to use the jQuery plugin jTemplate
I'm trying to use the :visible and :first-child pseudo-selectors together in jQuery and it

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.