Skip to content

Vertical alignment of ::after pseudo elements

When I place svg image next to text, with vertical-align: middle;, then it aligns pretty nicely. However, if I use svg in the ::after pseudo-element, then the results are not as expected. Furthermore, when I click on text to remove its content, then remaining svg element still keeps its unaligned position: He…

Connect mangoDB Atlas with nodejs

I can’t connect to MongoDB database, yet I tried everything ! I have successfully replaced the password. Here is the Database MangoDB Answer You will need another function to complete the operation. the function is usually called run then you need to write all the operations of your server in the scope …

Select only the clicked button JQuery

I have this ajax function, which should change the style of the clicked button, but for some reason it does not work. I’m not getting any errors in the console and the ajax call is successful Any idea what’s wrong here? Html: Answer Your issue is with using this incorrectly. The way you are using …

How to export and use a function using Express?

I have two file alarm.js and notifications.js. In alarm.js I need to call a method called sendPush from notifications.js. What I’ve tried : Exporting the function from notifications.js: Importing it in alarm.js and use it : The problem: I keep getting the error saying helperNotif.sendPush is not a funct…