I try to apply class on tr and th i try this but effect did not reflect when i run this
html
<table id="tabledata"> </table>
and
- success: function (result) {
- var final = JSON.parse(result.d).response;
- console.log(JSON.parse(result.d).response)
- $("#tabledata").empty();
- $("th").addClass("GridviewScrollHeader");
- $("td").addClass("GridviewScrollItem");
- if (final.length > 0) {
- $("#tabledata").append(
- "<tr><th>ID</th><th>OwnerName</th><th>RegNo</th><th>MileageAccumlation</th><th>MaxSpeed</th></tr>");
- for (var i = 0; i < final.length; i++) {
- if (final[i] !== null) {
- $("#tabledata").append("<tr><td>" +
- final[i][0] + "</td> <td>" +
- final[i][1] + "</td> <td>" +
- final[i][2] + "</td> <td>" +
- final[i][3] + "</td> <td>" +
- final[i][4] + "</td></tr>");
- }
- }
- }
any solution?>