twitter-bootstrap closing alert does not work
css, html, twitter-bootstrap
Solution
I've sorted it out.
Instead of using a button, I'm now using a span, so the form doesn't get submitted:
<span class="close" data-dismiss="alert">×</span>
thanks for your help
Problem
I can't get it to work. When I click the close button, nothing happens. here's the code: ``` <div class=" alert alert-error alert-block" style="width:200px" > <button class="close" data-dismiss="alert">×</button> <span>errors</span> </div> ``` I've reproduced the issue on jsfiddler: http://jsfiddle.net/graphicsxp/7L7Nd/ EDIT ``` @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> } ```