Smart gel materials are capable of controlling and switching swelling, water state, and wettability properties triggered by external stimuli. In this study, we fabricated a series of polyelectrolyte hydrogels bearing a 3-trimethylammoniumpropyl pendant to a methacrylamide-based backbone and examined the switchability with hydrophobic-like counteranions. The exchange between the initial chloride and camphor sulfate (CaS), dodecyl sulfate (DS), and perfluorooctanoate (PFO) counterions was investigated. The kinetics of the exchange showed that the fast exchange (within 4 h) of PFO allowed for a favorable coordination for ion pairing, resulting in a decrease in hydration. The reversibility of the exchange to the Cl- ion was only enabled for the CaS ion due to its bulkiness, while the PFO and DS hydrogels were unable to exchange, even by using tetrabutylammonium chloride, which is a structurally similar reagent, due to aggregation or the coagulates in the collapsed state of the linear tails of the counterions. The hydrogels exhibited a modulable water state and water swelling. Moreover, the hydrogels containing DS and PFO, as counterions, showed surface hydrophobic (contact angle 90°) and high hydrophobic (110°) behavior, respectively. The Raman spectrometry fluorescence with a pyrene probe indicated an increase in strong hydrogen-bonded water molecules, water confinement, and hydrophobic domains in the PFO hydrogel. Moreover, the PFO-modified hydrogel demonstrated a free-floating ability on the water surface, with a strong water repellency, showing that it has the potential to be applied in a floating pH detection device to distinguish between volatile and nonvolatile bases in a controlled manner.