【问题标题】:Why the magnificPopup does not show ajax content为什么 magnificPopup 不显示 ajax 内容
【发布时间】:2015-04-02 12:36:26
【问题描述】:

我创建了一个简单的网页,并希望显示带有不同页面的弹出窗口,该页面作为弹出消息加载,基本上我想做here.中描述的某事。我创建了一个简单的网页:

<html>
<head>
    <link rel="stylesheet" href="css/magnific-popup.css"> 
    <script src="js/jquery.min.js"></script>
</head>
<body>
<a href="hi.html" class="ajax-popup-link">Show inline popup</a>

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

<!-- Magnific Popup core JS file -->
<script src="js/jquery.magnific-popup.js"></script>
<script>
$('.ajax-popup-link').magnificPopup({
  type: 'ajax'
});
</script>
</body>
</html>

后来我创建了示例 hi.html 网页:

<html>
<body>
hello
</body>
</html>

点击第一个网页上的链接后,我看到的只是灰色网页和白色的“正在加载...”语句... 我做错了什么?

【问题讨论】:

    标签: jquery ajax web popup magnific-popup


    【解决方案1】:

    您需要在请求的文件 (hi.html) 中有一个 doctype 声明。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-10-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-10
      相关资源
      最近更新 更多