Я пробовал официальное всплывающее окно jQuery Mobile, а теперь также попытался Magnific Всплывающий плагин, и все они отображают содержимое всплывающего окна на моей странице, а не скрывая его и показывая его позже в модальном.jQuery всплывающее содержимое отображается на странице, и всплывающее окно не отображается
index.php:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="magnific.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="magnific.js"></script>
<script src="moment.js"></script>
<script src="livestamp.min.js"></script>
<script src="main.js"></script>
</head>
<body>
<div class="wrapper">
<!-- Like so: -->
<a href="#test-popup" class="open-popup-link">Show inline popup</a>
<!-- Or like so: -->
<a href="mobile-friendly-page.html" data-mfp-src="#test-popup" class="open-popup-link">Show inline popup</a>
<!-- Popup itself -->
<div id="test-popup" class="white-popup mfp-with-anim mfp-hide">You may put any HTML here. This is dummy copy. It is not meant to be read. It has been placed here solely to demonstrate the look and feel of finished, typeset text. Only for show. He who searches for meaning here will be sorely disappointed.</div>
main.js:
$(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.
});
});
По какой-то странной причине, всплывающие окна не отображаются, а вместо этого я вижу, что это содержание на index.php
. Результатом этого получилось jQuery-Mobile Popup. Что я делаю не так?
Благодарим вас за подробный ответ, проверьте его, когда я получу свободное время и сообщит вам, если это сработает. – Ricardo