jquery each instead of forEach