title: Portability of nextElementSibling/nextSibling
body: <p>I'm currently writing an accordion and running into the same problem as described in <a href="https://stackoverflow.com/questions/4578455/nextsibling-difference-between-ie-and-ff">nextSibling difference between IE and FF?</a> - specifically differences between Microsoft's nextSibling / nextElementSibling and that implemented by everyone else.</p>
  
  <p>For various reasons, using jquery is not an option. Nor is getting all my MS users to upgrade to MSIE9</p>
  
  <p>Currently I'm using the following code to work around the problem:</p>
  
  <pre><code>// tr is a TR doc element at entry....
  while (nthRow--) {
       // for Chrome, FF tr=tr.nextElementSibling; for MSIE...tr=tr.nextSibling;
       tr=tr.nextElementSibling ? tr.nextElementSibling : tr=tr.nextSibling;
       if (!tr || tr.nodeName != "TR") {
              break;
       }
       tr.style.display="";
  }
  </code></pre>
  
  <p>Which seems to do what I expect in MSIE6, FF and Chrome - i.e. the nthRow TR elements below the initial TR are made visible (previously style.display="none").</p>
  
  <p>But is this likely to have unexpected side effects? </p>
  
  <p>(I'm a bit of a newbie with Javascript ;)</p>