Fred is right that MathJax doesn't currently provide an API to change
individual elements within an equation. (It would be possible to
modify the internal Element Jax tree and ask MathJax to rerender the
result, but you are probably better off just replacing the entire
equation and rerendering, as the parsing of the equation is not the
time-consuming part of MathJax.)
On the other hand, perhaps you can use the <maction
actiontype="toggle"> to accomplish what you need. When a user clicks
on this element, it cycles through a list of expressions to display.
There is an extension to give you access to this from within TeX. Add
"action.js" to the extensions array in the TeX section of your
configuration, and then you can use
\toggle{math1}{math2}...\endtoggle
to produce an expression initially showing math1, but when you click
on math1 it will change to math2, and so on. So
x + \toggle{y}{\color{red}{y}} + z
would produce an equation where when you click on the y it turns red
(and clicking again makes it black again). Perhaps that can do what
you need.
Davide