Ivo
Ivo

Reputation: 2636

Go back to the previous page twice on click

I'm having this script

$('#verder').click(function(){
    if(document.referrer.indexOf(window.location.hostname) != -1){
        parent.history.back();
        return false;
    }
});

so on click of #verder it will go back like you clicked ones on the back button of your browser.

so now my problem i need to make it go back 2 times.

how can i fix this?

Thank you in advance!

Upvotes: 1

Views: 3874

Answers (1)

Ry-
Ry-

Reputation: 224942

History.go can do that:

parent.history.go(-2);

Upvotes: 8

Related Questions