Ok so, I am creating this site and I want every page to have a navigation bar, how do I make it so that instead of having to write the html for the navigation bar on every page, I just write in the .js file and add this javascript file to every page. Btw, I’m not asking how to write
Tag: html
Display output with a string character and with an input?
I have two things that relate to adding a character to the output view. Pronouns – Right now, it is hidden until someone types in their preferred pronoun. It’ll output her/she if that’s what they put, but I would like to do ‘(‘ + “her/she” + ‘)’; 2.The out…
How can I change the margin of the element with a variable in JavaScript?
I am quite a beginner and trying to learn JavaScript. I am trying to improve an example for Popup. I want to adjust the left margin of the popup so I can center the element to the text. I added the CSS for reference but I am trying to do it in JS. Basically the problem is if I put
How to easily display Image from Node JS
I can’t find a simple solution how to display an image on my website. I can read it in my node js backend but it will download the file instead of placing in my img tag. Do you have a simple solution for that? Thank you very much! HTML NODE JS Answer The problem you face here is not how
Uncaught ReferenceError: deleteNote is not defined at HTMLButtonElement.onclick
so, i just learn about make some website with flask. everything was fine until this error makes me crazy. can u solve my problem? this is my def function to delete some note and this is my .js code and this is how i make the button with html can u help me? i dont know how to solve it.
Overlay of two images with transparency
I’m looking for a solution in Javascript maybe to create a real-time preview of products based on multiple options that a consumer could choose from multiple radiobutton. Exemple : I have a face.png and a hat.png with transparents parts, and a cap, and when I click on cap, I would like to display the im…
reduce javascript code (stack overflow 2022) [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last year. Improve this question I’m doing this puzzle, and sometimes when I give a new game the pieces go wrong, I added…
Transition from right to left
I want my div on the right to transition from right to left, and the div on the left to transition from left to right. The one on the left is naturally moving from left to right but how do I get the one the right to move from right to left. This is the code that I have used.
Display animation complete once even though many animations are fired
I created some code where every time the user clicks the “Go” button the animation starts, and once the animation completes the code prints “Finished”. I want to make it so that, if the user clicks “Go” multiple times before the previous animation ends, don’t print &#…
Incrementing array index on button click javascript
I was creating a website where you can watch an episode of a tv series. I got all the YouTube codes and stored them in an array. I want it to change the index of the array whenever I click the ‘Next episode’ button. I know I can add alot of eventListeners but that lagged my website. Please help me