我有最新版本的工作:Bootbox模態未出現
- jQuery的3.0.0.1
- 引導3.3.6.1
- Bootbox 4.4.0
我的HTML:
A+ Certification, Grad. 2011 Comptia
<a id="e1658b80-0c48-e611-8277-14feb5fbeae8" class="glyphicon glyphicon-remove" title="Delete this entry" href="/[controller]/[action]/e1658b80-0c48-e611-8277-14feb5fbeae8"> </a>
我的JavaScript,在頁面中嵌入直接benea TH刪除鏈接:
<stript type="text/javascript">
$(function() {
$('#39b75c0a-0a48-e611-8277-14feb5fbeae8').on('click', function(e) {
e.preventDefault();
bootbox.confirm('Do you wish to delete this entry?', function(result) {
if (result) { window.location = $(this).attr('href'); }
});
});
});
</script>
我的頭:
<script src="/Scripts/modernizr-2.8.3.js">
<script src="/Scripts/jquery-3.0.0.js">
<script src="/Scripts/bootstrap.js">
<script src="/Scripts/bootstrap-datepicker.js">
<script src="/Scripts/bootstrap-switch.js">
<script src="/Scripts/bootbox.js">
<script src="/Scripts/respond.js">
<script src="/Scripts/jquery.validate.js">
<script src="/Scripts/jquery.validate.unobtrusive.js">
<script src="/Scripts/metisMenu.js">
<script src="/Scripts/jquery.slimscroll.js">
<script src="/Scripts/jquery.peity.js">
<script src="/Scripts/jquery.mask.js">
<script src="/Scripts/script.common.js">
<script src="/Scripts/script.internal.js">
<link rel="stylesheet" href="/Content/bootstrap.css">
<link rel="stylesheet" href="/Content/bootstrap-datepicker3.css">
<link rel="stylesheet" href="/Content/bootstrap-switch/bootstrap3/bootstrap-switch.css">
<link rel="stylesheet" href="/Content/font-awesome.css">
<link rel="stylesheet" href="/Content/inspinia.css">
<link rel="stylesheet" href="/Content/style.internal.css">
(這些尚未精縮;生產輸出將是)
現在我已經得到了設置,試圖點擊刪除錨點實際上並不會導致瀏覽器跟着錨點href
(這很好,我們要警告用戶使用模態!),但出於某種原因,模態對話框拒絕顯示。沒有灰色的屏幕,什麼都沒有。
對此提出建議?
是引導3.3.6.1使用jQuery 3.0.0.1兼容?你嘗試打開一個boostrap(不是bootbox)模式嗎?你是否得到任何js錯誤? – tmg
3.3.6.1沒有最高版本設置爲一個依賴:https://www.nuget.org/packages/Bootstrap之前版本3.3.6.0做https://www.nuget.org/packages/bootstrap/3.3.6 **編輯:**好吧,whattya知道... NuGet軟件包並沒有完全正確地構建,因爲它們沒有反映出適合jQuery的maxversion依賴項:https://github.com/twbs/bootstrap/blob/v3 .3.6/bower.json –