Skip to content

Tag: javascript

Multiple p5.js Canvases in the same page [duplicate]

This question already has answers here: Can I create multiple canvas elements on same page using p5js (2 answers) Closed last month. although I have some experience with processing, I am new to p5.js. For an academic work, I want to create a website with multiple interactive experiences. I want this website t…

How to properly add admin user to a database?

Let’s say I have an endpoint for posting new users with a logic like this: This would work but now of course every user could set the isAdmin flag. Another way would be adding admin users manually to the database but this is probably not the best way. Is there a recommended way to solve this problem? An…

JQuery onclick change z-index

Main Goal: “a page’s z-index to move to the most front once clicked and the most front to be behind the clicked one.” My approach: onclick change the clicked class z-index to the most front and subtract the current most front z-index by one ps: This is what I came up with but I’m not s…

image overlapping with text

Hello I am new to coding. My image is overlapping with the text in the about us section. in the tutorial I’m watching the text is next to the image. It does not overlap with it. Any help? How do I fix this problem? Answer By inline-block your objects will be side-by-side and giving both objects width of…

myFunction querySelector, blank page

I have 50 more images to put on my html page so I use this code thanks to your help before and it’s working. But I need to change this code to this : and when I do this, I see it working in my inspector but I have a blank page and there is no error in the console.