"fnDrawCallback": function () {
jQuery(element).find('thead tr th:last-child').replaceWith("<th>View / Edit</th>");
jQuery(element).find('tbody tr').each(function () {
var courseID = $(this).find('td:first-child').html();
var links = "<a href='/view?id={{courseID}}'></a>";
$(this).find("td:last-child:not(:first-child)").replaceWith("<td>" + links.replace(/{{courseID}}/g, courseID) + "</td>");
});
}
CSS to position search and page drop downlist:
.dataTables_filter {
float: left !important;
text-align: left !important;
}
.dataTables_length {
float: right !important;
text-align: right !important;
}
jQuery(element).find('thead tr th:last-child').replaceWith("<th>View / Edit</th>");
jQuery(element).find('tbody tr').each(function () {
var courseID = $(this).find('td:first-child').html();
var links = "<a href='/view?id={{courseID}}'></a>";
$(this).find("td:last-child:not(:first-child)").replaceWith("<td>" + links.replace(/{{courseID}}/g, courseID) + "</td>");
});
}
CSS to position search and page drop downlist:
.dataTables_filter {
float: left !important;
text-align: left !important;
}
.dataTables_length {
float: right !important;
text-align: right !important;
}
No comments:
Post a Comment