The match between .val('Bruce jones')
and value="Bruce Jones"
is case-sensitive. It looks like you're capitalizing Jones in one but not the other. Either track down where the difference comes from, use id's instead of the name, or call .toLowerCase()
on both.