我正在尝试使用jQuery UI链接到外部页面的选项卡中的锚点。似乎问题是它在URL中创建了两个主题标签。我怎样才能解决这个问题?
这是我到目前为止所拥有的: http://jsfiddle.net/3n2ux/
$(function () {
var href = location.href;
if (window.location.hash) {
var split = href.split("#"); // split the string; usually there'll be only one # in an url so there'll be only two parts after the splitting
location.hash = split[1];
}
window.location.href = split[0] + "#" + split[2];
});