2014-06-22 2 views
1

간단한 모달 대화 상자를 열려고하는데이 작업을 수행하는 데 어려움을 겪고 있습니다. Can모달 대화 상자. - 혼란스러운

아무도 도와주세요. 이것은 HTML 코드입니다 (사전을 제거하십시오). 이것은 단순히 작동하지 않습니다.

누구든지 ** 강력한 텍스트 ** 나에게 이유를 말해 줄 수 있습니까? 나는 실제로 내가 출력하는 종류를 얻지 못했다. .

아무도 도와주세요. magnific - 팝업 플러그인 전에

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
    <title></title> 
    <link href="css/magnific-popup.css" rel="stylesheet" /> 
    <script src="js/jquery.magnific-popup.js"></script> 
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" ></script> 
</head> 
<body> 


    <a class="popup-modal" href="#test-modal">Open modal</a> 

<div id="test-modal" class="white-popup-block mfp-hide"> 
    <h1>Modal dialog</h1> 
    <p>You won't be able to dismiss this by usual means (escape or 
     click button), but you can close it programatically based on 
     user choices or actions.</p> 
    <p><a class="popup-modal-dismiss" href="#">Dismiss</a></p> 
</div> 


    <script> 

     $(function() { 
      $('.popup-modal').magnificPopup({ 
       type: 'inline', 
       preloader: false, 
       focus: '#username', 
       modal: true 
      }); 
      $(document).on('click', '.popup-modal-dismiss', function (e) { 
       e.preventDefault(); 
       $.magnificPopup.close(); 
      }); 
     }); 

    </script> 

</body> 
</html> 

답변

1

로드 JQuery와, 그것은 (내가 그것을 사용한 적이 있지만 사전에 추가 withfixed 'JQuery와'있는 그대로 내가 seeeing 그렇게 믿고있어)

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
    <title></title> 
    <link href="css/magnific-popup.css" rel="stylesheet" /> 
    <!-- Jquery loaded first here... --> 
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" ></script> 
    <!-- Plugins after... --> 
    <script src="js/jquery.magnific-popup.js"></script> 

</head> 
<body> 
JQuery와에 의존