0

Im looking for a simple cross-browser plugin or method that can help me do this :

$('#clear_window').click(function(){ $('#window').fadeOut(50); var activeTab = $("ul.tabs li.active").find("a").attr("href"); $(activeTab).fadeIn(50); }); 

but on the click of the browsers back button not on the #clear_window click

2 Answers 2

0

You can through HTML5 History API. But this only supported by Gecko (Firefox), Chrome and Internet Explorer 10+

For what you want you can read it in MDN documentation.

However, if you can how your application handle your URLs, then you can implement it through the hashchange event, similar to how this jQuery plugin handles it.

Sign up to request clarification or add additional context in comments.

Comments

0

You cannot detect broswer's back button click. The only way to do is to detect "leave page" event. This might help... Best way to detect when a user leaves a web page?

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.