Jquery How to use history plugin?

Posted by Martijn on Stack Overflow See other posts from Stack Overflow or by Martijn
Published on 2010-05-27T08:14:10Z Indexed on 2010/05/27 9:41 UTC
Read the original article Hit count: 157

Filed under:
|

In my web application I am using ajax and now I'd like the back and forward browser buttons to work. So I went looking for a jquery history plugin and found this one: http://stilbuero.de/jquery/history

In my code I use a function to load a page:

function loadDocument(id, doc) {
    $("#DocumentContent").show();

    // Clear dynamic menu items
    $("#DynamicMenuContent").html("");
    $("#PageContent").html("");

    // Load document in frame
    $("#iframeDocument").attr("src", 'ViewDoc.aspx?id=' + id + '&doc=' + doc + '');

    // Load menu items
    $("#DynamicMenuContent").load("ShowButtons.aspx");
}

As you can see I want my pages to load within an Iframe. Can someone tell me how I can use a history plugin so that the brwoser buttons will work? I don't really care which plugin it is, as long as the browser buttons work. I prefer an easy to use plugin.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery