jQuery-JTable: add on click event for row?

前端 未结 1 1415
一整个雨季
一整个雨季 2021-02-02 02:00

I have to following code to show my user table, this is achieved by JTable.



        
相关标签:
1条回答
  • 2021-02-02 02:26

    This should get you on your way:

    $('#userTableContainer').jtable({
        ....
        recordsLoaded: function(event, data) {
            $('.jtable-data-row').click(function() {
                var row_id = $(this).attr('data-record-key');
                alert('clicked row with id '+row_id);
            });
        }
    });
    
    0 讨论(0)
提交回复
热议问题