2012-11-16 3 views
3

prettyphoto의 버전 3.1.4를 사용합니다. (http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/). URL에서 "#prettyphoto [iframe]/number /"을 삭제하고 싶습니다. 나는 딥 링크를 설정했습니다 : 거짓이지만 이것은 도움이되지 않습니다. 나는 그것이이 기능들로부터 문제가 될 수도 있다는 것을 이해했다 :Jquery PrettyPhoto URL에서 #prettyphoto를 제거

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";} 

어떤 생각?

+0

누군가주세요. – Pascut

+2

+1. #prettyphoto를 URL에 추가하는 것은 #prettyAnnoying입니다! –

답변

1

A)이 나를 위해 일한 :

function clearHashtag(){ 
    if(location.href.indexOf('#prettyPhoto')!==-1) 
     location.hash=""; 
} 

이 코드는 설정 같은 다른 방법이있다 jquery.prettyPhoto.js

의 바닥

B)에 있습니다 : 딥 링크는 : 거짓에서 jquery.prettyPhoto.js의 시작 부분.

나는 여기에 의미 :

(function($){$.prettyPhoto={version:'3.1.4'};$.fn.prettyPhoto=function(pp_settings){pp_settings=jQuery.extend({.. deeplinking: false; ...} 

희망 나는 도왔다.

+0

나는이 모든 일을했지만 아직 일하지 않고있다. –

+0

제게 자세한 정보를 입력하십시오. Manindra – Pascut

+0

위의 모든 언급을 끝 냈지만 url.i에서 #prettyphoto 태그를 삭제할 수는 없습니다. 버전 3.1.4를 사용하십시오. –

9

이 내 코드입니다 그리고 그것은 나를 위해 일한 :

<script type="text/javascript" charset="utf-8"> 
     $(document).ready(function(){ 
     $("a[rel^='prettyPhoto']").prettyPhoto({ 
     social_tools:false, 
     deeplinking:false}); 
     }); 
    </script> 
+0

완벽 감사 – kneidels

1

3.1.5 버전은이 작품 같은

(function($){$.prettyPhoto={version:'3.1.5'}; 
$.fn.prettyPhoto=function(pp_settings){pp_settings=jQuery.extend(
{.. deeplinking: false; ...} 
0

겠습니까 뭔가를 작동합니까?

(function($) { 
    console.log('check'); 

    $.prettyPhoto = { 
     version : '3.1.5' 
    }; 

    $.fn.prettyPhoto = function(pp_settings) { 
     pp_settings = $.extend({ 
      deeplinking : false 
     }); 
    }; 

    $("a[rel^='prettyPhoto']").prettyPhoto(); 

})(jQuery);