$ .notify is not a function with Bootstrap in MVC after ajax call

I want to show a notification when ajax function is completed. My ajax is good, I just can't get the notification to work. I have jquery and everything is installed, and I also have notify.js. From the Chrome console, I found out the error below

Uncaught TypeError: $ .notify is not a function

And also I get my ajax response. Below is the code for notification,

@if (TempData.ContainsKey("SuccessMessage"))
{
    <script>
        $.notify({
            message: '@TempData["SuccessMessage"].ToString()'
        }, {
            type: 'success',
            delay: 7000,
        });
    </script>
}

And below are the links added for the same,

<script src="/bootstrap/js/notify.js"></script>
<script src="/scripts/js/jquery.min.js"></script>

Let me know if I make mistakes

+4
source share
1 answer

Invert ad

<script src="/scripts/js/jquery.min.js"></script>
<script src="/bootstrap/js/notify.js"></script>
Run codeHide result
+4
source

Source: https://habr.com/ru/post/1660310/


All Articles