minddust / jquery-pjaxr

Pushstate aJAX eXtended Replacements
www.minddust.com/project/jquery-pjaxr
MIT License
70 stars 8 forks source link

Signal for history:go(-X) #9

Closed iekadou closed 10 years ago

iekadou commented 10 years ago

It could be useful to implement a signal for javascript to recognize that the user clicked the browser's back button, or triggered a history.go(-X).

minddust commented 10 years ago

there is already pjaxr:start and pjaxr:end which will be triggered on popstate. doesn't that workout for you?

iekadou commented 10 years ago

Actually the Pop event should be triggered only if the popstate was fired. After a logout a page could not be the same like before, so you should be able to trigger the "popstate" event and then check if the person is still logged in or logged out already, so you modify the page...

minddust commented 10 years ago

wanna make a pr for further discussion?

iekadou commented 10 years ago

Will not be needed anymore after #29.