i'm using
var btn = dom.byId("portAid");
btn.innerHTML=omsportAid;
btn.style.fontWeight = 'bold';
How to remove/hide the div(portAid)?
i'm using
var btn = dom.byId("portAid");
btn.innerHTML=omsportAid;
btn.style.fontWeight = 'bold';
How to remove/hide the div(portAid)?
Possible duplicate: Remove element by id
var element = document.getElementById("portAid");
element.parentNode.removeChild(element);
To remove it:
btn.style.display="none";
Or to simply hide it:
btn.style.visibility="hidden";
The difference is that with visibility: hidden the component will still take up space, but it will be invisible. Display:none removes the component and collapses the other components that surround it on the now empty space.