2011-09-07 4 views
0

오버레이 플러그인 jquery tools을 사용하고 있습니다. 오버레이에서 특정 URL을로드합니다. 오버레이에 URL을로드 한 후 jQuery에서이 URL을 가져 오는 방법은 무엇입니까?jQuery 도구를로드 한 후 어떻게 오버레이에서 URL을 가져 옵니까?

업데이트 :

내가 거기에 내가 액세스를 시도하고 설정 몇 가지 매개 변수를 가지고 있기 때문에 내 코드가 JQuery와 오버레이 open external link example

내가 URL을 알고 싶은 이유처럼 보이는

입니다.

+0

포스트 코드 - 당신이 그것을 어떻게 따라 당신은 URL을 필요로하는 곳에 –

답변

1

기본 코드를 사용하여 :

// if the function argument is given to overlay, 
// it is assumed to be the onBeforeLoad event listener 
$("a[rel]").overlay({ 
    mask: 'darkred', 
    effect: 'apple', 
    onBeforeLoad: function() { 

     // grab wrapper element inside content 
     var wrap = this.getOverlay().find(".contentWrap"); 

     // load the page specified in the trigger 
     wrap.load(this.getTrigger().attr("href")); 

     // save the currently-loaded URL as a data field on the wrapper 
     wrap.data('currenturl',this.getTrigger().attr("href")); 
    } 
}); 

을 당신이 URL을 얻기 위해 필요한 것은 이것이다 :

$(".contentWrap").data('currenturl'); 
관련 문제