Kelvin Luck schrieb:
> Hi,
> 
> As I just mentioned in another thread, I've just launched this jquery 
> based site:
> http://flashr.kelvinluck.com/
> 
> On it I am using the history/ remote plugin to add back button support. 
> As you can see, this works well with one exception... When you go back 
> to the page you originally landed on then the contents of the page 
> doesn't change. So if you go to http://flashr.kelvinluck.com/ and click 
> around a bit then the back and forward buttons will work fine until you 
> go back as far as the homepage at http://flashr.kelvinluck.com/ when the 
> contents of the page won't actually update.
> 
> I think this is because the hash isn't being set when the page initially 
> loads. This is despite line 43 of common.js (executed on document ready):
> 
> $('[EMAIL PROTECTED]"#' + currentPage + '"]').trigger('click');
> 
> Which is successfully triggering a click event on the relevant link and 
> getting as far as the comment on line 78. Afaik, this return true should 
> mean that the default action of the link (e.g. the href) is followed and 
> the hash on the URL is updated. But this isn't happening which I think 
> is why the "back to the first page" is also broken.
> 
> Has anyone got any ideas what is going on?


Yes I have :-) I had a similiar problem with my Tabs. Just initialize 
ajaxHistory with a custom callback, that gets fired in the case there's 
no hash...:

$.ajaxHistory.initialize(function() {
    // do something useful
});


This is lacking in the documentation, I'm sorry.


-- Klaus

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to