Nested Data Table is not function , while clicking Jquery
Nested Data Table is not function , while clicking Jquery:
while clicking the detail-control class is not firing its function. the following code am using Nested DataTable is not functioning , in Jquery while click:
$('#tblDataTable tbody').on('click', 'tr
td.details-control', function () {
var tr
= $(this).closest('tr');
var
row = dt.row(tr);
var
idx = $.inArray(tr.attr('id'), detailRows);
if
(row.child.isShown()) {
row.child.hide();
tr.removeClass('details');
//
Remove from the 'open' array
detailRows.splice(idx, 1);
}
else {
row.child(format(row.data())).show();
tr.addClass('details');
//
Add to the 'open' array
if
(idx === -1) {
detailRows.push(tr.attr('id'));
}
}
});
dt.on('draw', function () {
$.each(detailRows, function (i, id) {
$('#' + id + 'td.details-control').trigger('click');
});
});
This site helps to clear your all query.
ReplyDeleteThis is really worth reading. nice informative article.
allahabad university BA 3rd year result
mgsu ba 1st year result