views:

209

answers:

1

Im using this history jquery plugin http://www.mikage.to/jquery/jquery_history.html and im trying to inspect the back stack.

I can call this $.historyCurrentHash to return the current hash, but im trying to figure out how to look one step back in the stack.

if i try calling this $.historyBackStack, but i just get an 'undefined'. anyone got any ideas?

I can see that its not a public variable, but im wondering if i need to modify the library or just call it in a different way

A: 

Are you trying to look back at non-hash history? Like.. trying to see what the actual last different-URL-page was?

Because the browser does not expose this.

Matt
i know the browser doesn't support this but surely this plug-in is building up its own 'history' stack
nickmorss
@nickmorss - Dump `$.historyBackStack` to your console and see what's there
Matt
tried this, i get >>> $.historyBackStack.pop()TypeError: $.historyBackStack is undefined.
nickmorss
Sounds like the plugin isn't loaded then. On the [demo page](http://www.mikage.to/jquery/jquery_history.html) I get an array. But the plugin itself does seem buggy.. first index or two is always `undefined` in that array.
Matt
hmmm, your accessing the array with what query via the console? pretty sure mine is loading as the demo works
nickmorss
I'm just typing in `$.historyBackStack` and pressing the return key.
Matt