Holiday Notice – Support Unavailable on April 18 and April 21

We just wanted to let you know that our support team will be offline on Friday, April 18th (Good Friday) and Monday, April 21st (Easter Monday) due to the holidays.
We'll be back on Tuesday, ready to assist you!

In the meantime, if you need any help, feel free to:

Amelia YouTube Channel

wpDataTables YouTube Channel

Thank you for your understanding, and we wish you a wonderful holiday weekend!

Okay
  Public Ticket #905809
jQuery code
Closed

Comments

  •   Lughen started the conversation
  • [deleted] replied

    Hi Laughen,
    Thank you for your purchase.

    You can try with this one. You have to replace #table_1 selector with your actual table selector.

    jQuery(window).load(function() {
        var clickRow = jQuery("#table_1").on('click', 'tbody tr', function() {
            var id = jQuery(this).find("td:first").text();
            alert(id);
        }).DataTable();
    });


  •  2
    Lughen replied

    Hi Milos,

    Thank you very much... It works perfectly. 

  •  2
    Lughen replied

    Hi Milos,

    One thing more, should it be always the id column? thanks.

  • [deleted] replied

    Hi Lughen,

    No you can select any column. You can call var id how do you want and td:first is first column. You can change it to select any other column. 

  •  2
    Lughen replied

    Hi Milos,

    Thank you very much. I got it.