Я пытаюсь добавить table
внутри <td>
элемента.Этот код прекрасно работает для first two rows
, после чего весь дизайн datatable
сваливается.Дайте мне решение, где я ошибся.Здесь я попробовал до сих пор.
$("td.text-center", row).html('');
var str = "";
str += " <table>";
str += " <tr>";
str += " <td>";
str += ' <a href="#" onclick="GetContactsDetails(' + item[i].projectIcode + ')" data-toggle="tooltip" title="Contacts" class="btn btn-info" style="width:100px;">Contacts</a>';
str += " </td>";
str += " <td>";
str += ' <a href="#" onclick="GetPhasesDetails(' + item[i].projectIcode + ')" data-toggle="tooltip" title="Phases" class="btn btn-info" style="width:100px;">Phases</a>';
str += " </td>";
str += " </tr>";
str += " <tr>";
str += " <td>";
str += ' <a href="#" onclick="GetmodulesDetails(' + item[i].projectIcode + ')" data-toggle="tooltip" title="Modules" class="btn btn-info" style="width:100px;">Modules</a>';
str += " </td>";
str += " <td>";
str += ' <a href="#" onclick="GetTechnologyDetails(' + item[i].projectIcode + ')" data-toggle="tooltip" title="Technologies" class="btn btn-info" style="width:100px;">Technology</a>';
str += " </td>";
str += " </tr>";
str += " </table>";
$("td.text-center", row).append(str);
$("#example-datatable").append(row);
row = $("#example-datatable tbody tr:last-child").clone(true);