Using diallylmethyl alkyl ammonium salts (CCX) (X is alkyl's chain length, represents 12, 14, 16, and 18, respectively) as a comonomer of methacrylic (MAA), hydrophobically modified hydrogels of poly diallylmethyl alkyl ammonium salts‐methacrylic acid (PCCX‐MAA) were prepared by free radical copolymerization in aqueous solution. The synthetic conditions, such as dosage of cross‐linking agent, reaction concentration and length of alkyl chain were studied in detail. Results indicated that the swelling degree of hydrogels was decreased with dosage of cross‐linking agent, or monomer concentration increased at different pH. Incorporation of the different length of alkyl chain hydrophobic CCX units on PMAA chains by random distribution can change reswelling kinetics. The required time for reaching equilibrium swelling state was longest for PCC16‐MAA. Copyright © 2011 John Wiley & Sons, Ltd.