A composite comprising a fabric and a polyampholyte hydrogel is provided. In the composite, the polyampholyte hydrogel is a hydrogel of a polymer bearing randomly dispersed cationic and anionic repeat groups and at least a part of the fabric is coated with the polyampholyte hydrogel. A method of preparation of the composite comprises steps (a) to (c): (a) providing a monomer mixture for preparation of a polyampholyte hydrogel; (b) immersing a fabric in the monomer mixture solution; and (c) polymerizing monomers in the monomer mixture solution to obtain a precursor of the composite.