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