【发布时间】:2015-05-08 01:45:02
【问题描述】:
所以我有 Magnific Popup 插件设置,当您单击链接时,弹出窗口会出现。我希望这个弹出窗口包含与所述链接有关的所有信息。现在,我终于得到了正确设置和正确查看的所有内容,但我无法让 closeOnContentClick 工作。我读到这默认设置为 false ,当您单击内容时,它仍然会消失。我手动将其设置为 false,并且仍然执行相同的操作。这是否与出现的面板的宽度有关?我已经将它专门设置为 800px,但仍然搞砸了
Javascript:
$(document).ready(function() {
$('#player_table').dataTable({
"processing": true,
"serverSide": true,
"ajax": "serverside/handler.php"
//"jQueryUI": true,
});
$(document).ajaxComplete(function() {
$('.popup').magnificPopup({
type: 'ajax',
closeOnContentClick: false
});
});
});
$(function() {
$("#tabs").tabs({
beforeLoad: function(event, ui) {
ui.jqXHR.fail(function() {
ui.panel.html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"");
});
}
});
});
Javascript 应该是调试所需的全部。但如果您需要 html,我可以提供。
这是 Ajax 响应。
<div id="pop-form" class="white-popup">
<center>
<h2>You're currently viewing <? echo $values['username']; ?>'s Profile Analysis</h2>
<? if ($result !="" ) { //NO ERRORS on load.. produce form ?>
<!-- create page -->
<div id="left">
I'm Left
</div>
<div id="right">
I'm Right
</div>
<? } else { //ERROR - needs to be noted echo $a1 . " - ERROR";
}?>
</center>
<div style="clear:both;"></div>
</div>
【问题讨论】:
-
请出示您的代码
-
@LeoFarmer 我添加了 Javascript
标签: javascript jquery html css magnific-popup