Your question is not clear to me. Do you want to change CSS classes after the page is already loaded (and the user performed some action)? If so, you need to do that on the client side with JavaScript by updating the respective DOM node with the desired classes.