Well the moon like the earth revolves around the Sun. If you were far away you would see that as the moon goes around the sun it wobbles a little bit because it also revolves around the Earth.
If the earth suddenly disappeared...POOF!!!!!, the moon would continue in its orbit around the Sunalthough the wobble in the orbit would disappear.