ページからページへの ajax 呼び出しを実行するスクリプトを使用していますが、理解できないのは、href をクリックするたびにブラウザの現在の場所が www.blabla/#index に変わる理由です。以下のコードを見てください。ターゲットは、現在の場所を「#」のないものに変更することです -www.blabla/index
$("document").ready(function() {
var hash = window.location.hash.substr(1);
var href = $('#tabs-bar li a').each(function(){
var href = $(this).attr('href');
if(hash==href.substr(0,href.length-5)){
var toLoad = hash+'.html #content';
$('#content').load(toLoad)
}
});
$('#tabs-bar li a').click(function(){
var toLoad = $(this).attr('href')+' #content';
/// $('#content').fadeOut('100');
$('#content').empty();
$('#load').remove();
$('#profile-cv').addClass("loading");
//$('#content').append('<div class="loading"></div>');
setTimeout(function () { loadContent(); }, 1000);
window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5);
function loadContent() {
$('#profile-cv').load(toLoad,showNewContent())
}
function showNewContent() {
$('#profile-cv').append(hideLoader());
}
function hideLoader() {
$('#profile-cv').removeClass("loading");
}
return false;
});
});