mouse0270 / bootstrap-notify

Turns standard Bootstrap alerts into "Growl-like" notifications.
http://bootstrap-notify.remabledesigns.com/
MIT License
2.25k stars 641 forks source link

$.notify is not a function #201

Open C0lacan opened 6 years ago

C0lacan commented 6 years ago

Hello, I'm facing a problem developing with Notify (Now UI from Creative TIM). I saw a similar issue #152, but the solutions are not so optimistic.

My environment: Laravel 5.6 vue.js 2.5.7 Bootstrap 4.0.0 Jquery 3.3.1


in vue.js .then(function (resp) { $.notify("Hello World"); app.$router.push({path: '/admin/'}); })

The console logs as

Uncaught TypeError: $.notify is not a function


Without Vue.js, the problem is still there.

I'm running everything OK if the code is <script> jQuery.notify("Hello World"); </script>

but when it comes to

<script> $(document).ready(function() { jQuery.notify("Hello World"); }); </script>

The console also logs as

Uncaught TypeError: $.notify is not a function


How can I fix this? or is there any one having the same issue here? Thanks for reading ^ _ ^

mouse0270 commented 6 years ago

You wouldn't happen to have a public URL I could look at to look into this issue.

tangram67 commented 5 years ago

May it be that animate.css was not included?

datayeah commented 5 years ago

Rethink the order of your javascript imports. Maybe you placed your notification trigger before the notify.js import.

salmanbangash1176 commented 4 years ago

in my case i have to put the $.notify in a $(document).ready(function() {}) cause it was executing before libraries were loaded;

Rohitparakh commented 3 years ago

Rethink the order of your javascript imports. Maybe you placed your notification trigger before the notify.js import.

Worked! Thankyou :)

AhmadSaeedAwan78 commented 3 years ago

Mostly it's due to the jquery version, use the compatible version of Jquery, Problem will be solved

simion-chis commented 3 years ago

I solved with window.notify = require("bootstrap4-notify"); in bootstrap.js and then use $.notify({options},{settings}) Laravel 8 Bootstrap 4.6

babakgm commented 1 year ago

I solved with window.notify = require("bootstrap4-notify"); in bootstrap.js and then use $.notify({options},{settings}) Laravel 8 Bootstrap 4.6

i use bootstarb 4 and php. this solution not work for me can u help more

u write this code frist line? and $.notify({options},{settings})` in function? i want call snotify from function