change Length to appropriate type, change interface{} in Each() to the
appropriate JQuery type