没有任何错误,但按钮不起作用

Does not have any error but the button does not works

<!DOCTYPE html>  
<html>
<head><script type="text/javascript" >
</script>

<!-- jQuery 1.7.2+ or Zepto.js 1.0+ -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.js">
                                 $(document).ready(function () {
                                     $('#btnContact').magnificPopup({
                                         items: {
                                             src: '../Documents/ContactForm.html'
                                         },
                                         type: 'iframe'
                                     });
                                 });

</script>
<section class="singlecol nosiblings" role="main">
<style>

<!-- Magnific Popup core CSS file -->
<link rel="stylesheet" href="magnific-popup/magnific-popup.css">

.responsive {
width: 100%;
height: auto;
}

</style>
</head>

如何解决?当我单击按钮时不起作用。表单没有弹出但没有任何错误。为什么 $(document).ready(function () 不读取?

您应该在不同的 <script> 标记中编写 $(document).ready 处理程序。

<script src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.js">
</script>

<script>
   $(document).ready(function () {
       $('#btnContact').magnificPopup({
         items: {
           src: '../Documents/ContactForm.html'
         },
         type: 'iframe'
       });
  });

</script>