Title: Table Row onclick event?
Last modified: February 22, 2019

---

# Table Row onclick event?

 *  Resolved [gamattox](https://wordpress.org/support/users/gamattox/)
 * (@gamattox)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/table-row-onclick-event/)
 * Hi Tobias,
 * Does Tablepress support anything like an onclick event? The goal is to have my
   custom code execute upon clicking on a single row. The code that would execute
   would be different based on which row is clicked.
 * Thanks,
    Gary

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/table-row-onclick-event/#post-11237321)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Yes, that should not be a problem. TablePress created a normal HTML table, so
   that you can use jQuery code like
 *     ```
       jQuery(document).ready(function($) {
         $( '.tablepress-id-123' ).on( 'click', 'tr', function() {
           ... 
         }
       });
       ```
   
 * to catch clicks on table rows in JavaScript.
 * Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘Table Row onclick event?’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/table-row-onclick-event/#post-11237321)
 * Status: resolved