views:

55

answers:

1

I have the following jQuery code:

$("a").click(function() {
    if ($(this).attr('href') != '#') {
        if (strpos($(this).attr('href'), 'mob.php') !== false) {
            $.ajax({
              url: $(this).attr('href')+"&logo=0",
              cache: false,
              success: function(html){
                $("#ajax").html(html);
              }
            });
            return false;
        }
    }
});

The problem is that when someone presses the back button they leave the website instead of going back to the previous page. Is there a work around for this?

+1  A: 

Use a jquery history plugin

Also take a look at this question.

GvS