How to solve Uncaught TypeError: $ (...) .modal is not a function in ASP.NET MVC 4?

0

I'm doing a project in asp.net mvc c #, the problem I have is that within my controller has an ActionResult that returns a PartialView so that it can be displayed within a modal window, the problem is when I open the modal register a new product, when it is opened for the first time everything works fine, normal. The problem is when I close and try again to open that same modal, I generate the following error by console

Uncaught TypeError: $(...).modal is not a function
at showCreate (Usuarios:138)
at HTMLAnchorElement.onclick (Usuarios:159)

Someone can tell me how to solve this error, this comes to me in all the modal windows that show a PartialView of the application, to make the call to those PartialView I do it by jquery in this way

function showCreate() {
    $('#create').modal('show');
    $('#tip').html("<p><i class='fa fa-spinner fa-pulse fa-3x fa-spin'></i> &nbsp; Carcagndo...</p> ").load('@Url.Action("Create")');
}
    
asked by Jhonny Luis 18.09.2018 в 21:29
source

0 answers