2011-10-31 4 views
0

다음은 코드의 일부입니다. 상자는 잘 표시되지만 옵션 중 아무 것도 아무 것도 영향을 미치지 않습니다!Jquery fancybox 옵션이 작동하지 않습니다.

팝업 HTML은 : 페이지 하단의

<div id="fb-pop"> 
    <div id="fb-content"> 
     <div class="fb-txt"> 
      <strong>Have you considered buying a license for Construct 2?</strong><br /><br /> 
      It comes with more lots more features and possibilities. Make better games!<br /> 
      <span class="ti">(And no more annoying messages!)</span> 
     </div> 
     <a class="get" href="REPLACEME" title="Your support is appreciated!"></a><br /> 
     <a class="no-thx" href="javascript:void(0)" onclick="$.fancybox.close()" title="Are you sure? Upgrading your license helps support Construct 2's development!">No thanks, maybe next time!</a> 
    </div> 
</div> 
<a href="#fb-content" id="autostart"></a> 

JS를 :

jQuery(document).ready(function() { 

    $("a#autostart").fancybox({ 
     'transitionIn': 'elastic', 
     'transitionOut': 'elastic', 
     'speedIn': 600, 
     'speedOut': 200, 
     'overlayShow': false 
    }); 

    $("a#autostart").fancybox().trigger('click'); 

가 아무리 자바 스크립트 아무것도 넣지 어떤 옵션/속성

변경 보인다! 모든 브라우저에서 여전히 똑같은 방식으로 작동합니다.

클릭하면 배경 오버레이로 fancybox가 닫히지 않으므로 사용자가 X 또는 닫기 링크를 클릭해야합니다. 대신

$("a#autostart").trigger('click'); 

:

$("a#autostart").fancybox().trigger('click'); 
+0

'$ ("# 자동 시작")가'선택기로 잘 작동합니다 – Hogan

+0

@Hogan 선택기가 변경되었습니다. 문제는 모든 것이 잘 작동하지만 속성/옵션을 변경하면 상자는 여전히 똑같이 작동합니다. 옵션은 fancybox에 전혀 영향을 미치지 않는 것 같습니다. –

+0

오, 나는 그것을 고칠 것이라고 생각하지 않았습니다. 단지 당신이 ID를 가지고 있다면 당신은 다른 것을 필요로하지 않을 것이고 아마도 더 빠르지는 않을 것입니다. – Hogan

답변

5

확신이 아니라 당신이다.
관련 문제