[Closed] How do I make text appear in a div when I hover over another?

I have made a homepage for my website with an overview of all of the aspects. Right now, there’s only images with hyperlinks, but I’d like to add extra information about each link in a specific div when you hover over the image. I am okay with using JavaScript if it is easier that way. I have only added some text for #xchat, and not for the rest, to try it out. Here’s the project page: https://glitch.com/~cypress-chalk-cone

Any help is greatly appreciated. Thanks in advance.

I would recommend that you have a look at this:

You can use jquery to detect if you are howering over one div, then run some code like this:

That is entirely possible using plain JavaScript (without having to use an external dependency like jQuery) although it increases the number of lines code. You can simply use the two event listeners mouseover and mouseout.

I would suggest the built-in DOM method because its simple and also because jQuery is a large library and unless you are going to make extensive use of it, it’s probably not worth the overhead downloading times and stuff.

1 Like

Yeah. I am trying to use a service worker to cache 811 files on a static site. It gives it 106% cpu, so I have to cut it in half. :rofl:

it takes 30 seconds to load…

edit: I can live happy once again…


oh —

Screenshot 2020-10-20 at 10.53.54 PM

Anyways, don’t use too much stuff or else that will happen.