Why do you invoke `val()` twice?