I'm printing data's dynamically in javascript using document.createElement
. Is there any way to lock the first column when scrolled horizontally?
var row = document.createElement("TR");
//Name
var td1 = document.createElement("TD");
var element1 = createSpan(Id, NameName);
td1.appendChild(element1);
row.appendChild(td1);
//Phone
var td2 = document.createElement("TD");
var element2 = createSpan(phoneId, phoneName);
td2.appendChild(element2);
row.appendChild(td2);
//Email
var td2 = document.createElement("TD");
var element2 = createSpan(emailId, emailName);
td2.appendChild(element2);
row.appendChild(td2);
.
.
.
.
I want to lock the Name column while scrolling horizontally. So that, the Name stays in the 1st position and the remaining columns moves.