Вот костыль
document.getElementById('but').addEventListener('click', function( e ) {
var elem = (e && e.target || event.srcElement || document).previousSibling;
for( ;elem; elem = elem.previousSibling ) {
if ( elem.id == "name" ) {
elem.style.display = "none"
}
}
}, false);