1

I am currently using the jQuery Address plugin and it works great for detecting when a user presses the forward/back keys. However, I don't need any other functionality from the plugin so it seems like a waste to load it. Is there another JavaScript or jQuery API call that will let you fire a function when the user presses the forward or back buttons on their browser?

The most important factor is that it will work cross browser - something that jQuery Address takes care of internally(??). I looked at the Address plugin's source on GitHub to see if I could pick out only the portion I needed but I only see browser specific code for IE.

Any ideas?

Thanks in advance!

Peter Hanneman
  • 523
  • 1
  • 5
  • 18

1 Answers1

0

I've just implemented some key events on my web app just this morning. Based on the suggestion of a colleague I used keymaster , it's very light weight (minified version is ~2k), standalone - so no js library dependencies, simple and easy to deploy. It also has some nice features like key Scopes and Modifier keys. Demo here

Nijk
  • 113
  • 1
  • 7