普通网友 2015-03-04 09:33
浏览 1

部分页面引用

I am using a basic PPR. However i want to extend it. till now it only loads the content and doesn't change my url and aren't able to use the back button.

this is my script:

$(document).ready(function() {
   $('#loader').load('content/index.php');

   $('ul#link1 li a').click(function() {
        var page = $(this).attr('href');
        $('#loader').load('content/' + page + '.php');
        return false;
   });
   $('ul#link2 li a').click(function() {
        var page = $(this).attr('href');
        $('#loader').load('content/tickets/' + page + '.php');
        return false;
   });
   $('ul#link3 li a').click(function() {
        var page = $(this).attr('href');
        $('#loader').load('content/lineup/' + page + '.php');
        return false;
   });
   $('ul#link4 li a').click(function() {
        var page = $(this).attr('href');
        $('#loader').load('content/news/' + page + '.php');
        return false;
   });
   $('ul#link5 li a').click(function() {
        var page = $(this).attr('href');
        $('#loader').load('content/media/' + page + '.php');
        return false;
    });
    $('ul#link6 li a').click(function() {
        var page = $(this).attr('href');
        $('#loader').load('content/contact/' + page + '.php');
        return false;
    });
});

Could anybody tell me how to get to use the browser backbutton and url?

  • 写回答

0条回答 默认 最新

    报告相同问题?