Replace $.parents with $.closest

parents() may returns more than one parent, but in some cases we want only the closest parent.