开发者

Jquery How to use history plugin?

开发者 https://www.devze.com 2023-01-01 00:47 出处:网络
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/histo

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 fu开发者_开发技巧nction 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.


I was recently working on a web application that needed to maintain back and forward history for ajax content. I decided to go with Ben Alman's BBQ plugin found here: http://benalman.com/projects/jquery-bbq-plugin/

It is quite simple to use and he has several examples on how to implement it.


Since I am using an Iframe, the back and forward buttons are still working! I was under the impression that this wouldn't work because I use ajax, but it does work!

0

精彩评论

暂无评论...
验证码 换一张
取 消