I have a div full of links formatted to look basically like square buttons. Each link represents a given product brand. Currently they are anchor tags that link only to # but in the future they may need to link to webpages.
When the user hovers on each link, I want to display the relevant logo image and some explanatory text. What gets displayed will be different for every link they hover on. The box needs to display near their cursor (or near the link) and disappear after they are done hovering.
How can this be done?
Here's an example of the kind of code I'm imagining:
<a href="#">Applegate Farms</a><div><img src="applegate-farms-logo.png"><p>Organic and Natural Meat Products</p></div> <a href="#">Arrowhead Mills</a><div><img src="arrowhead-mills-logo.png"><p>Bread and pancake mixes, hot and cold cereals, seeds and grains</p></div> <a href="#">Artisana</a><div><img src="artisana-logo.png"><p>Organic Nut and Seed Butters</p></div> <a href="#">Back to Nature</a><div><img src="back-to-nature-logo.png"><p>Cookies, Crackers, Granolas</p></div>
I found this code on StackOverflow but it doesn't work for me. I don't know how to display different data for each different link. It appears to me the code is going to load the img from the id #cursor for every link.