My modal won’t open

Asked

Viewed 66 times

0

The modal is working normally but does not open inside this function, I am very lay in javascript

        $(function($) {
        $('#frmLogin').submit(function() {

            $('div.mensagem-erro').html('');    

            $(this).ajaxSubmit(function(resposta) {

                if (!resposta)
                    window.location.href = '3.php';
                else
                {
                    $('div.mensagem-erro').html(resposta)
                    $('#recebeusalario').modal();
                }

            });

            return false;

        });
    });
  • Hello! Error appears in browser console?

  • Uncaught Typeerror: $(...). modal is not a Function at Object.<Anonymous> (2.php:78) at Object.options.Success (jquery.form.js:149) at j (jquery.min.js:2) at Object.fireWith [as resolveWith] (jquery.min.js:2) at x (jquery.min.js:4) at Xmlhttprequest.<onymous> (jquery.min.js:4)

  • The function Alert works normal, and the modal function is also working normal but then use : var estavaemp = Function(){ $("#estavaemp"). modal() }

  • The modal function does not work in this place, only the Alert function!

  • could explain a little more what you’re doing? it would also help to put the HTML code being used

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.