How to fix '$.extend is not a function' error in nodejs

May 19, 2019, at 2:10 PM

I have SPAs. I use nodejs + mongoDb. In the end of my SPAs, I have contact form. When visitor fill the contact form and click submit button. I received an E-mail. Everythings fine until here. I want to show notification for visitor. and I decided to use toastr. When I click submit button. I getting an error. "$.extend is not a function".

In npm web site, toastr say before the toastr.js include jquery. I include jquery. but nothing I getting same error.

app.js call trycontroller.



// I installed jquery from npm 
const jquery = require('jquery');
const toastr = require('toastr');'/', urlencodedParser, function (req, res) {
        main(req.body.nameContact, req.body.emailContact, req.body.subjectContact, req.body.messageContact)
            .then(() => {
                console.log("Email Sended");  
                toastr.success('Have fun storming the castle!', 'Miracle Max Says')
            }, err => { 
                console.log("Email Error: " + err) })

and this my index.ejs

<script src=""></script>
<script src=""></script>
Object animation with constrained views

Object animation with constrained views

Is there a way to animate a view with other views constrained to it, that the other views will follow the animated view? Like i want to set animation for 1 object and the rest would moce along it by constraints?

How to use variable in another file?

How to use variable in another file?

I want to pass an variable to another fileI use the lat variable in new js file but not working

How do I access a particular part of an HTML tag?

How do I access a particular part of an HTML tag?

I am using console on google chrome to edit the web pageI could just use inspect element and change what I am trying to change, but after discovering I could do this on the console