The elastic shear modulus G and swelling pressure ω are studied for a basic, pH-responsive hydrogel synthesized by crosslinking copolymerization of co-monomers hydroxypropyl methacrylate and N,N-dimethylaminoethyl methacrylate with crosslinker tetraethylene glycol dimethacrylate. Under normal conditions of use as a "smart" material, hydrogel swelling ratio Q and pH vary simultaneously, but here G and ω values are presented as a function of pH with Q held constant and vice-versa. At fixed pH, G decreases with increase in Q in a power law dependence, as predicted by the FloryRehner model. However, at fixed Q, G increases with decrease in pH (i.e, increase in degree of ionization). The pH effect is more pronounced than the volume effect, thus the hydrogel stiffens as it swells in response to pH change. At high pH, ω values of the uncharged hydrogel obey the FloryRehner model, whereas explicit ionic contributions can be identified at lower pH values.