我无法让它工作。当我单击关闭按钮时,什么也没有发生。
这是代码:
<div class=" alert alert-error alert-block" style="width:200px" >
<button class="close" data-dismiss="alert">×</button>
<span>errors</span>
</div>
我已经在 jsfiddler 上重现了这个问题:http: //jsfiddle.net/graphicsxp/7L7Nd/
编辑
@using (Html.BeginForm(null, null, FormMethod.Post, new { id = "quoteWizard" }))
{
<input type="hidden" id="ModelType" value="CarQuoteRequestViewModel" />
ViewBag.ValidationSummaryClass = ViewData.ModelState.IsValid ? "validation-summary-valid" : "validation-summary-errors";
<div class="@ViewBag.ValidationSummaryClass alert alert-error in fade" data-valmsg-summary="true">
<button class="close" data-dismiss="alert">×</button>
<span>Before you can continue, please make sure you have completed the mandatory fields
highlighted below.</span>
<ul style="display: none" />
</div>
@RenderSection("QuoteSection")
<div class="ui-formwizard-nav">
<input id="back" value="@Resource.Global.Previous" type="reset" class="btn btn-primary" />
<input id="next" value="@Resource.Global.Next" class="btn btn-primary" type="submit" />
</div>
}