Skip to content

Tag: javascript

value of text.replace() to another variable

I have a code to clear and paste text after clicking a button. This text is pasted into two different textareas and therefore my code has to clean up the intercepted content a bit differently. The problem is that it doesn’t work to pass the content to another variable… I want txtq and txte to form…

Derecursing this specific JS function

I wrote the following recursive JS function that takes a single parameter node which is made of other nodes and modifies it by adding to each node its number of leaves (not only direct children) : Here’s an example of the node parameter : addWidth(object) would modify it and turn it into : I need help t…

hovering on one element while scrolling

how to hover on one element when scrolling. If you don’t know how it’s done, please tell me at least what it’s called. There is a similar effect here. link searched on many forums. Because I don’t know what it’s called, that’s why I couldn’t find it Answer If you want…