pablofr
pablofr

Reputation: 134

modal is not a function inside a function

When I answered true it shows me an error:

modal is not a function

When false it displays the HTML fine. I do not understand why html() works but not modal().

$('#conxModal').modal('toggle'); // Work here    
function postProcessing(data) {
        $.each(data, function(key, val) {
            if (val == true) {
                $('#conxModal').modal('toggle');
            }
            if (val == false)   {
                $("span#erreurcnx").html('bad');
            }
        });
    }

Upvotes: 0

Views: 65

Answers (1)

pablofr
pablofr

Reputation: 134

I add :

jQuery.noConflict();

it is fix.

Upvotes: 2

Related Questions