Replaced .attr with addClass.