我的代码中有模态的问题,没有出现和类“模态背景淡入”的div是空的。
<body>
<button type="button" title="Usuń" class="deleteButton btn btn-default btn-xs pull-right">Usuń</button>
<div id="confirm" class="modal hide fade">
<div class="modal-body">
Are you sure?
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn btn-primary" id="delete">Delete</button>
<button type="button" data-dismiss="modal" class="btn">Cancel</button>
</div>
$("body").on('click', "button.deleteButton", function (e) {
var clickedButton = $(this);
e.preventDefault();
$('#confirm').modal({ backdrop: 'static', keyboard: false })
.one('click', '#delete', function () {
clickedButton.attr("disabled", true);
});
});
这是我的小提琴: https://jsfiddle.net/cjdtzsha/
它可能是什么原因?
答案 0 :(得分:2)
从hide
<div id="confirm" class="modal hide fade">
important
对display:none
属性<div class="modal-content"></div>
规则中删除modal-header
课程,不要让模式显示。
现在添加modal-footer
并将<div id="confirm" class="modal fade">
<div class="modal-content">
<div class="modal-body">
Are you sure?
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn btn-primary" id="delete">Delete</button>
<button type="button" data-dismiss="modal" class="btn">Cancel</button>
</div>
</div>
</div>
和In [18]:
df1.add(df).fillna(df1)
Out[18]:
a b c d
0 2 4 8 9
1 2 12 10 7
2 2 16 14 10
括在其中
In [20]:
df1.add(df).combine_first(df1)
Out[20]:
a b c d
0 2 4 8 9
1 2 12 10 7
2 2 16 14 10
解决所有问题。