use jQuery’s `$.each`