javascript - How to distinguish browser back / forward button? -


Is this possible? Even better, is it possible with jQuery?

I need to know whether to use the back button or forward button so that I can use the page transition effect correctly, e.g. Slide from left - if they are hits forward and vice versa.

You can use the library

But if you do it yourself If you want to handle, then you can use the hash key ( window.location.hash ) by setting the slide number present there for example. When the user clicks back or the hash key changes, you can find out and make changes.

Unfortunately you have to set the interval (i.e .: 300 mms) and check the changes in the past. The previous value is an onshanks event in HTML5.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -