我使用 prettyphoto 的 3.1.4 版本。 (http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/)。我想从 URL 中删除“#prettyphoto[iframe]/number/”。我已经设置了 deeplinking:false 但这没有帮助。我知道这可能是这些功能的问题:
function getHashtag(){url=location.href;hashtag=(url.indexOf('#prettyPhoto')!==-1)?decodeURI(url.substring(url.indexOf('#prettyPhoto')+1,url.length)):false;return hashtag;};
function setHashtag(){if(typeof theRel=='undefined')return;location.hash=theRel+'/'+rel_index+'/';};
function clearHashtag(){if(location.href.indexOf('#prettyPhoto')!==-1)location.hash="prettyPhoto";}
有什么想法吗?
最佳答案
这是我的代码,对我有用:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto({
social_tools:false,
deeplinking:false});
});
</script>
关于javascript - Jquery PrettyPhoto 从 URL 中删除#prettyphoto,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13417132/