Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$.notify is not a function #201

Open
C0lacan opened this issue Aug 6, 2018 · 8 comments
Open

$.notify is not a function #201

C0lacan opened this issue Aug 6, 2018 · 8 comments
Assignees

Comments

@C0lacan
Copy link

C0lacan commented Aug 6, 2018

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
Copy link
Owner

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

@mouse0270 mouse0270 self-assigned this Aug 7, 2018
@tangram67
Copy link

May it be that animate.css was not included?

@datayeah
Copy link

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

@salmanbangash1176
Copy link

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

@Rohitparakh
Copy link

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

Worked! Thankyou :)

@AhmadSaeedAwan78
Copy link

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

@simion-chis
Copy link

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

@babakgm
Copy link

babakgm commented Sep 19, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants