var js = document.querySelectorAll( ".js" ); js[ 0 ].setAttribute( "data-icon", "u0086" ); js[ 1 ].setAttribute( "data-icon", "†" );