I use version 3.1.4 of prettyphoto. (http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/). I want to remove "#prettyphoto[iframe]/number/" from URL. I've set deeplinking:false but this don't help. I've understood that it might be the problem from these functions:
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";}
Any idea?
This is my code and it worked for me:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto({
social_tools:false,
deeplinking:false});
});
</script>
a) This worked for me:
function clearHashtag(){
if(location.href.indexOf('#prettyPhoto')!==-1)
location.hash="";
}
This code is at the bottom of jquery.prettyPhoto.js
b) There is another way, like setting: deeplinking: false at the beginning of jquery.prettyPhoto.js.
I mean here:
(function($){$.prettyPhoto={version:'3.1.4'};$.fn.prettyPhoto=function(pp_settings){pp_settings=jQuery.extend({.. deeplinking: false; ...}
Hope I helped.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With