opportunism (n.)
"policy of adopting actions to circumstances while holding goals unchanged," 1870, from opportune + -ism. Compare opportunist.