I am developing an MVC with Bootstrap App. I am calling a Bootstrap PopUp windows via Jquery.
This is my call
<div style="float:left;width:100%;height:30px;" class="Sees">
<img class="btnNuevoMsg" src="~/Content/Images/NuevoMsg.png" onclick="New()" />
</div>
On New() function I do some validation. Dependind of this validation, I can Redirect to another View or, call Controller Method that returns a Partial View, whitch I render in Bootstrap tag.
this is my bootstrap tag.
<div class="modal fade" id="myModalLog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
</div>
My Jquery function is like this.
$.ajax(
{
type: "POST",
url: '@Url.Action("ShowLogUser","Home")',
//data: { search: _search },
success: function (result) {
$('#myModalLog').html(result);
$('#myModalLog').modal();
// $('#myModalLog').modal('toggle');
// $('#myModalLog').modal('show');
},
error: function (req, status, error) {
}
});
It Works fine...
the problem I find is that I can not use
data-toggle="modal"
via Jquery...
I do not want to close PopUp Windows when User clicks outside the Windows.
I have tried using $('#myModalLog').modal('toggle'); as it is shown in the example, but it does not work.
How can I use ths property in Jquery?
Thanks