I am trying to determine the previous page (e.g. the referrer) in order to decide whether to display the back button.
I tried to check for $('.current').data('referrer'), but it is not always set. In fact, it is often not set. history.previous and document.referrer do not seem to be set, either.
Could someone please enlighten me on this?
I didn’t want to go down this path, but the only viable solution I can find is the internal variable (i.e.
hist) that jQTouch keeps the browsing history. So, I made the following changes to jqouth.js (revision 146):around line 256, just before the private functions section, insert:
around line 625, just before
submitForm: submitForm, insert:Then I can look at the browsing history with something like:
One caveat is, care should be taken not to accidentally maniplulate the history object.
EDIT:
The author has exposed the internal history object since the version on 14 October 2010, so it can be directly accessed, i.e.
jQT.hist.