I am using a ajax called pages and trying to make the browser's "back" and "forward" buttons work.
These are the handlers:
<li><a href="#" class="ceni">примерни цени</a></li>
<li><a href="#" class="karieri">кариери</a></li>
And this is my javascript that calls the pages to appear without reloading the whole page(the ajax ):
$('.ceni').click(function(){
$.ajax({
url: 'pages/ceni.php',
success: function(response) {
$("#pages").html(response);
}
});
});
$('.karieri').click(function(){
$.ajax({
url: 'pages/karieri.php',
success: function(response) {
$("#pages").html(response);
}
});
});
Note: I am not a specialist or something, so please talk to me simply as you can. Thanks a lot :)