javascript logic for badge selector