I was driving and went to put the hazard lights on and they didn't work, and then I noticed my blinkers didn't work either.

After pulling over I checked all the fuses under the glove box and they were good. My headlights were still working

About 5 minutes later I drove off and my blinkers started working again, but my hazard lights do not work.

What could cause them to go out briefly and then start working again?