rgvcorley
rgvcorley

Reputation: 2933

Make browser back button close jQuery UI dialog

What would be the simplest way to go about making the browser back button close a jQuery UI dialog?

I know there are plugins for 'virtual addresses' with hash tags, but I'm after something simpler than this — the app I am building is predominantly a classic web app but with a few modal ajax forms.

Upvotes: 1

Views: 1665

Answers (1)

paulslater19
paulslater19

Reputation: 5917

onhashchange event? This is only supported on some browsers, but there are plugins that implement it on others. E.g. http://benalman.com/projects/jquery-hashchange-plugin/

Upvotes: 2

Related Questions