JS: merge two .attr calls into one for .