Jump to content

Roll Over


lilman

Recommended Posts

I want to learn how to create a drop down box when the mouse goes over text. I also would like to learn how to change the background to a <td> when a mouse goes over it. Someone here said the best way to learn is from Tutorials online as opposed to books, so I was wondering if anyone knew if any good tutorials that would show me how to do this.

 

Thank you

Link to comment
Share on other sites

to change the background of a td:

<td id="myid">
    <a href="#" 
    onmouseover="document.getElementById('myid').style.backgroundColor = '#cccccc';">Change background color</a>

</td>

--changes to a gray background color on mouseover, use a similiar method with onmouseout.

 

Link to comment
Share on other sites

Well i think no need of ajax there. You can do it with normal Javascripting....

 

I'm just glad it wasn't in the mysql forum or something ;)

 

As for the dropdown, if you want a select box, you'll have to put it in a div and alter its visiblilty. If you want just navigational links you can do that w/o any javascript by using css on <UL> elements.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.