Hide/unhide table row given the row index and table ID
Currently I have this code to delete a table row:
var remove = document.getElementById(rid);
if(remove!=null){
var v = remove.parentNode.parentNode.rowIndex;
document.getElementById(tid).deleteRow(v);
}
However, instead of delete it, I'd just like to hide it. What's a good way
to do this?
Also, in the future, I'm going to want to 'unhide' it at user request, so
how can I check if it has been hidden? The if(remove!=null) is what
checked if a row was already removed, so I'd need something similar. If
the row is hidden, I would unhide it.
Thank you for your time.
No comments:
Post a Comment