Fix $ reference for elements that are not direct children of form.

Switch $.each to forEach.