Jump to content

information appearing in box on :hover


Elevator_Hazard

Recommended Posts

I'm making a template for who knows what and I would like it so that when you hover over a link, (they are on table cells and change colors when hovered over) information will appear in a box somewhere else. Like say you hover on the Link1, the box like... to the right of the link bar will then be filled with info on the link... I'm thinking I could do this through hiding a cell and/or using z-index. Maybe not. please help

Link to comment
Share on other sites

I need it in a fixed location for all links you hover over. But I might be able to edit it how I please. Thanks.
If you don't mind using a little javascript, you can check out the HTML DOM, specifically the innerHTML property. You could write a function which changes the innerHTML of an element (a div perhaps) when you mouseover/click on something else on the page. Something like this:
<script type="text/javascript">var display;function updateDisplay(text){	// first, we get the DOM object for your display div.	display = (display) ? display : document.getElementById("display");	// then we change the innerHTML to be whatever we passed as "text".	display.innerHTML = text;}</script><img src="someimage.jpg" onmouseover="updateDisplay('How do you like this image?!');" /><div id="display"></div>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...