Jasny Bootstrap rowlink 关闭模式未关闭? [英] Jasny Bootstrap rowlink close modal is not closing?
问题描述
我真的对这个 Jasny Bootstrap rowlink 模式没有关闭有问题.我有导入 Bootstrap v 3.2.0.
当您单击打开一些数据的行模态时,我有这张表.到目前为止,这是有效的,在行单击模式打开,并显示一些数据 - 但是!当我关闭它时,它没有关闭(模态没有关闭).
这是我的模态表格的完整代码:
<头><tr><th>Interna št.</th></tr></thead><tbody data-link="row" class="rowlink">@if (Model.Spremenljivke != null){我 = 0;foreach(Model.Spremenljivke 中的 var 行){<tr><td>@row.Internal.First()<a href="#" data-toggle="modal" data-target="#myModal@(i)"/><!-- 模态--><div class="modalfade" id="myModal@(i)" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button><div class="modal-body"><div style="display: block"><p class="pscript">内部:<b>@Html.Raw(row.Internal.First())</b></p>
<div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
</td></tr>{i = i + 1;}}}</tbody>
在 _Layout 我有 css 和 js 链接到 jasny bootstrap.
非常感谢您的帮助
你的 </div>
太多了,不是吗?您在模态页脚之前关闭模态内容 div.由于缩进而难以看到......我相信这可能是错误的原因.
从模态中删除 fade
类,因为它有时可能会导致问题.
I am realy have problem with this Jasny Bootstrap rowlink modal not closing. I have import Bootstrap v 3.2.0.
There I have this table where I whant to have when you click on row modal with some data opens. So far this works, on row click modal opens, and show some data - BUT! when I close it, it doesn't close (modal is not closing).
Here is my intire code for table with modal:
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Interna št.</th>
</tr>
</thead>
<tbody data-link="row" class="rowlink">
@if (Model.Spremenljivke != null)
{
i = 0;
foreach (var row in Model.Spremenljivke)
{
<tr>
<td>@row.Internal.First()
<a href="#" data-toggle="modal" data-target="#myModal@(i)"/>
<!-- Modal -->
<div class="modal fade" id="myModal@(i)" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<div style="display: block">
<p class="pscript">
Interna št.: <b>@Html.Raw(row.Internal.First())</b>
</p>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</td>
</tr>
{
i = i + 1;
}
}
}
</tbody>
</table>
And in _Layout I have both css and js link to jasny bootstrap.
Realy thanks for any help
You have one </div>
too many, don't you? You are closing the modal-content div before the modal-footer. Hard to see because of indentation... I believe this could be the reason for the error.
Remove the fade
class from the modal as it may sometimes cause issues.
这篇关于Jasny Bootstrap rowlink 关闭模式未关闭?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!