Skip to content

how to add and remove text with javascript on a multi-p

i tried to add and remove the text of a box clicking on a different series of p this is the code. click1 is associated by text1 and same click2 text2 ecc. the goal i want to achieve is click on click1 and the only text that appears is text1 same thing for click2 text2 ecc. Answer

CSS Media Queries with ViewPoints

Well, I have been working on some website. It has come to my notice that mostly when people when using media queries they use fixed px values, or they use breaking points. so I wanted to know if it is bad to use viewpoints (vh/vw) in media queries, as so far they are working most devices. but the website work…

mocha test passes even though I throw error

in this block of code “err” is being printed, and the test passes. also tried – and done(). nothing worked, test is still passing every time. why is this happening? Answer Option 1: await the promise Just add await before the promise expression. You don’t even need those then and catch…

How to make same buttons work independently HTML/jQuery

I’m making favorite buttons that saves them with localStorage in a different page. I added those favorite buttons to every paragraph. I don’t want to write a lots of same codes for each of them. The question is that, is there any way to make same buttons work independently and save their parent ob…