3

I want to execute code before the hashchange event affects the page. how can i execute before hash change event? I want to use a confirm box on before hash chnage so that if i press cancel button of confirm box it does not navigate to new hash. I do not want to change hash on cancel button because it opens the page as new again and my changes to page state are lost. Please provide me a quick solution.

Ankit Sahrawat
  • 1,306
  • 1
  • 11
  • 24

0 Answers0