switched out .trim() to $.trim()