开发者

Click row on JQuery Data Table example

开发者 https://www.devze.com 2023-03-21 07:48 出处:网络
I\'m using开发者_运维百科 jQuery DataTable Ajax grid. I want to trigger the row click event. I execute following code in sequence but it doesn\'t execute.

I'm using开发者_运维百科 jQuery DataTable Ajax grid. I want to trigger the row click event. I execute following code in sequence but it doesn't execute.

        $('#category tbody tr').click(function () {
            alert('e');
        });

        $(document).ready(function() {
            var oTable = $('#category').dataTable( {
                "bProcessing": true,
                "bServerSide": false,
                "sAjaxSource": "sources/category.txt"
            } );
        } );


For future reference. live function worked well.

        $('#category tbody tr').live('click', function() {
            alert('e');
        });
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号