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.