Getting column value using DataTables jQuery Plugin -
i using datatables table jquery plugin show data in tabular format. looks this:
the last column, 1 name 'status', has hyperlinks user can click on.
what not able figure out 'name' column value when hyperlink row clicked!!!
so when click on 'disable' link first row, want value 'force awakens'.
i have not included code here straight forward used creator's website.
thanks in advance.
you can specific row content through api - table.row().data()
- passing <tr>
parent element :
$("#example").on('click', 'a', function() { alert('name is: '+table.row($(this).closest('tr')).data()[0]); });
demo -> http://jsfiddle.net/6s7kgx07/
Comments
Post a Comment