我想添加一些哈希參考鏈接,當我點擊菜單按鈕改成了實際的部分也許從阿賈克斯/ jQuery的位置
http://www.mycompany.com/about到http://www.mycompany.com/work也許/東西
我有這樣的解決方案但我不知道如何將此添加到我的實際解決方案中。
$(document).ready(function(){
$('#allcontent').load('data/home.html');
$('.hovers').click(function() {
var page = $(this).attr('href');
$('#allcontent').load('data/' + page + '.html');
return false;
});
});
這裏是我的小提琴:DEMO
這個也許? window.location.hash =
謝謝你這麼多
可能的重複[如何Github更改頁面和URL如此順利沒有AJAX?](http://stackoverflow.com/questions/5216314/how-is-github-changing-pages-and-the-url-如此順利 - 沒有ajax) – Quentin
無法理解問題。你會詳細解釋這個問題嗎? – Jai
非常感謝你!你是我的英雄! – andre34