当我点击激活夸大弹出式ajax调用的链接时,灰色背景显示为全屏。但是我试图看看背景是否足以覆盖登录表单(在弹出窗口内)。此外,无论我在ajax表单内单击它,它都会自动关闭。需要帮助请...
<a class="simple-ajax-popup-align-top" href="result.php">try me</a><br>
jquery Ajax脚本
$(document).ready(function() {
$('.ajax-popup-link').magnificPopup({
type: 'ajax',
alignTop: false,
overflowY: 'scroll'
});
});
和result.php如下:
<div class="login_body">
<form id='login' name="login" method="post" action="login_process.php" accept-charset='UTF-8'>
<input type='hidden' name='submitted' id='submitted' value='1'/>
<div class="field_container">Email:</label>
<input type='text' name='cust_email' id='email' maxlength="100" style="width: 250px; height: 30px"; /></div>
<div class="field_container">Password:</label>
<input type='password' name='cust_password' id='password' maxlength="12" style="width: 250px; height: 30px"; /></div>
<input type='submit' name='Submit' value='Login' />
</div>
</form>
</div>
答案 0 :(得分:0)
您应该在代码中添加closeOnContentClick: false
,例如:
$('.ajax-popup-link').magnificPopup({
type: 'ajax',
alignTop: false,
overflowY: 'scroll',
closeOnContentClick: false
});
查看文档以获取更多选项:http://dimsemenov.com/plugins/magnific-popup/documentation.html