<div> <input type="radio" checked /> <a href="#lalala"> </a> <span> ololo </span> </div> <script> var el = document.querySelector('input[type="radio"]'); while(el = el.nextSibling) if(el.tagName === 'SPAN') break; if(el) alert(el);</script>