用了張搞推薦的這個
這邊下載
http://github.com/cowboy/jquery-hashchange/raw/v1.3/jquery.ba-hashchange.min.js
放在jquery後
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.ba-hashchange.min.js"></script>
<script type="text/javascript" src="js/jquery.ba-hashchange.min.js"></script>
然後在他的事件裡打程式~~~~~看你要幹嘛~~~
很簡單使用吧A0A
$(window).hashchange( function(){
var hash = window.location.hash;
var tabSelect = hash.substr(1, hash.length);
changeTab(tabSelect);
});
var hash = window.location.hash;
var tabSelect = hash.substr(1, hash.length);
changeTab(tabSelect);
});
source
http://benalman.com/projects/jquery-hashchange-plugin/
沒有留言:
發佈留言