我试图找到我出错的地方。按下Show inline popup
时没有响应。 file:///Users/Desktop/POPUPTEST/POPUPTEST.html#test-popup
在浏览器窗口中显示:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<head>
<!-- Magnific Popup core CSS file -->
<link rel="stylesheet" href="magnific-popup.css">
<!-- Magnific Popup core JS file -->
<script type="text/javascript" src="jquery.magnific-popup.min"></script>
<!-- jQuery 1.7.2+ or Zepto.js 1.0+ -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
$(document).ready(function () {
$('.open-popup-link').magnificPopup({
type:'inline',
midClick: true // Allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source in href.
});
});
</script>
<style type="text/css">
.white-popup {
position: relative;
background: #FFF;
padding: 20px;
width: auto;
max-width: 500px;
margin: 20px auto;
}
</style>
</head>
<body>
<a href="#test-popup" class="open-popup-link">
Show inline popup
</a>
<div id="test-popup" class="white-popup mfp-hide">
Popup content
</div>
</body>
</html>