0
를 사용하는 동안 : http://dimsemenov.com/plugins/magnific-popup/
를이 내 코드입니다 :
<head>
<link href="Scripts/magnific-popup.css" rel="stylesheet" type="text/css" />
<script>
JS$(document).ready(function() {
$('.popup-with-form').magnificPopup({
type: 'inline',
preloader: false,
focus: '#name',
// When elemened is focused, some mobile browsers in some cases zoom in
// It looks not nice, so we disable it:
callbacks: {
beforeOpen: function() {
if($(window).width() < 700) {
this.st.focus = false;
} else {
this.st.focus = '#name';
}
}
}
});
});
</script>
</head>
이것은 내 몸 :
<body>
HTML<!-- link that opens popup -->
<a class="popup-with-form" href="#test-form">Open form</a>
<!-- form itself -->
<form id="test-form" class="mfp-hide white-popup-block">
<h1>Form</h1>
<fieldset style="border: 0px currentColor;">
<ol>
<li>
<label for="name">Name</label>
<input id="name" name="name" type="text" placeholder="Name" required="">
</li>
<li>
<label for="email">Email</label>
<input id="email" name="email" type="email" placeholder="[email protected]" required="">
</li>
<li>
<label for="phone">Phone</label>
<input id="phone" name="phone" type="tel" placeholder="Eg. +447500000000" required="">
</li>
<li>
<label for="textarea">Textarea</label><br>
<textarea id="textarea">Try to resize me to see how popup CSS-based resizing works.</textarea>
</li>
</ol>
</fieldset>
</form>
<script src="Scripts/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="Scripts/jquery.magnific-popup.js" type="text/javascript"></script>
</body>
내 프로젝트 루트에서 스크립트 폴더가 이러한 파일을 포함합니다 :
을jquery-1.11.0.min.js
jquery.magnific-popup.js
jquery.magnific-popup.min.js
magnific-popup.css
나는이 오류가 무엇입니까 프로젝트를 실행하면 : 내가 실수를했다 어디
Microsoft JScript runtime error: 'JS$' is undefined
알고 계십니까? 당신이 Magnific 웹 페이지에서 복사 할 때
JS$(document).ready(function() {
에서