2010-07-27 1 views
1

다른 도메인에 iframe을 삽입해야합니다. 클릭하면 멋진 상자를 사용하여 모달 상자가 열립니다.다른 도메인의 모달 상자 안에 웹 사이트를 포함

이렇게하면 작동합니다. 클릭이

내가 960x700

어떻게 것 fancybox 화면의 대부분을 차지해야하기 때문에이 작업을 수행 할 필요가 iframe을 보유 모달 상자 (fancybox)를로드하면

사용자가 이미지 를 클릭 이 작업을 수행?

답변

1

이와 비슷한 것이 좋습니다. API을 사용하는 방법에 대한 자세한 내용을 확인하십시오.

<html> 
    <head> 
     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> 
     <script type="text/javascript" src="http://fancybox.net/js/fancybox/jquery.fancybox-1.3.1.pack.js"></script> 
     <link rel="stylesheet" type="text/css" href="http://fancybox.net/js/fancybox/jquery.fancybox-1.3.1.css" media="screen" /> 
     <script> 
      $(document).ready(function() { 

       /* This is basic - uses default settings */ 


       $("a.iframe").fancybox({ 
        'transitionIn' : 'elastic', //Used for animation, delete if not needed 
        'transitionOut' : 'elastic', //Used for animation, delete if not needed 
        'speedIn'  : 600, //Used for animation, delete if not needed 
        'speedOut'  : 200, //Used for animation, delete if not needed 
        'overlayShow' : false, //Used for animation, delete if not needed 
        'width'   : 650, //Set your width 
        'height'  : 500 //Set your height 
       }); 

      }); 
     </script> 
    </head> 
    <body> 
     <a class="iframe" href="http://www.google.com">Click to open fancy box</a> 
    </body> 
</html> 
+0

감사합니다. 나는 js를 모두 결합해야하므로 하나의 파일을 연결 한 다음 갈 준비가되었다! –

+0

굉장! 다행스럽게 도울 수있었습니다. –

관련 문제