Reputation: 3434
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?
Upvotes: 4
Views: 6511
Reputation: 398
Would something like this work?
(function($) {
console.log('check');
$.prettyPhoto = {
version : '3.1.5'
};
$.fn.prettyPhoto = function(pp_settings) {
pp_settings = $.extend({
deeplinking : false
});
};
$("a[rel^='prettyPhoto']").prettyPhoto();
})(jQuery);
Upvotes: 0
Reputation: 11
3.1.5 version will work
(function($){$.prettyPhoto={version:'3.1.5'};
$.fn.prettyPhoto=function(pp_settings){pp_settings=jQuery.extend(
{.. deeplinking: false; ...}
Upvotes: 1
Reputation: 6084
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>
Upvotes: 10
Reputation: 3434
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.
Upvotes: 1