Switch to .val() instead of .attr()