if they are loose enough to come off, then pull them all the way off and put some good ol elmers glue on your bars.
Then you can either:
wait for it to dry completly so your bars are wider and more grippy from the dried glue.
or put the grips on right after you apply the glue.
No matter which one you pick you have to wait a day for it to dry with complete throttle grip.
if it moves on just one end then just get some quick drying nail glue and apply it around the slipping side under the grip.
Athletic tape always works wonders too, you can pick some up at a sports store. remember to wrap it tight.