Answer the question
In order to leave comments, you need to log in
Modal window in MVC 5 and Bootstrap?
Good afternoon! such a problem, I need to fix it so that a modal window opens, I'm not familiar with mvc, so I'm poking around. A friend made a modal using Jquery, but it should be on bootstrap.
@Html.ActionLink("Создать новую", "Create", new { }, new { @class = "btn btn-default viewDialog", data_dialog_title = "Создание модели" } )
<!-- modal placeholder-->
<div id='myModal' class='modal fade in'>
<div class="modal-dialog">
<div class="modal-content">
<div id='myModalContent'></div>
</div>
</div>
</div>
$(function () {
$.ajaxSetup({ cache: false });
$("a[data-modal]").on("click", function (e) {
$('#myModalContent').load(this.href, function () {
$('#myModal').modal({
/*backdrop: 'static',*/
keyboard: true
}, 'show');
});
return false;
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question