opening a jquery tab on the row click of dataTable

opening a jquery tab on the row click of dataTable

ramizkhan313ramizkhan313 Posts: 1Questions: 1Answers: 0

Hi,
My UI is based on Tabs , My first tab is fixed which is having dataTable grid in it.In that first tab i am displaying a dataTable which has clickable rows. On click of each row, i need to open the second tab.
Appreciate if any one can show me some direction with some inputs.
Thanks in advance

Answers

  • allanallan Posts: 63,489Questions: 1Answers: 10,469 Site admin

    To run an event on each table row click you would use a simple jQuery event handler:

    ``js
    $('#myTable tbody').on( 'click', 'tr', function () {
    ...
    } );
    ```

    How you create a new tab and populate it with content though, I'm not sure as it will depend heavily on the system you are using. But I'm sure you can take it from there.

    Allan

This discussion has been closed.