Should use forEach() instead of $.each()