I want to hide certain columns of a HTML template with JavaScript. Could anybody tell me how can I achieve this? I’ve tried giving IDs to the entire column TDs and then making document.getElementById("ID").style.display = "none" but it hides only the first TD.
Thank you.
IDs are only supposed to be used uniquely, i.e. for one element only, therefore
getElementByIdwill only return 1 element, the first that matches. Try using a class instead and:EDIT: in jQuery mode on accident >:)