见风使舵

change one's view according to circumstances, have it both ways, trim

jiàn fēng shǐ duò ㄐㄧㄢˋ ㄈㄥ ㄕㄧˇ ㄉㄨㄛˋ