I have an element grabbed from document.getElementById(\'the_id\'). How can I get its next sibling and hide it? I tried this but it didn\'t work:
document.getElementById(\'the_id\')
Firebug error was elem.nextSibling.style is undefined.
because nextSibling can be a text-node or other node type
do { elem = elem.nextSibling; } while(element && elem.nodeType !== 1); // 1 == Node.ELEMENT_NODE if(elem) elem.style.display = 'none';