xavier schrieb:
Hi,

Sorry, I'm completely lost.

I tried to dig into your tabs plugin, I don't understand where you
call it. I found:
                    if (settings.bookmarkable && trueClick) { // add
to history only if true click occured, not a triggered click
                        $.ajaxHistory.update(clicked.hash);
But that's about it.

Oh, I'm sorry, I totally forgot, that I had to change that when I introduced Ajax support for Tabs. But it is still basically the same as what the history method does...:


Could you provide some "meta" information about how to use your
plugin ?

Do I have to alter my hrefs to replace them with a #hash or can I
simply load from the onclick and return false ?

Where can I set the callback when the back/bookmark is called ?

First you need a link pointing to a hash:

<a class="history" href="#history">Click me</a>

Then you attach a click event handler that *must not* return false:

$('a.history').bind('click', function {
    // do something
    // do not return false
});

Finally register that link for history and initialize history:

$('a.history').history();
$.ajaxHistory.initialize();

Of course you should put the binding and the history enabling into one chain. As you can see, the callback is just the click event handler.


HTH, Klaus



Reply via email to