Toggle fold method function