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
https://forums.phpfreaks.com/topic/36779-roll-over/
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
https://forums.phpfreaks.com/topic/36779-roll-over/#findComment-175521
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
https://forums.phpfreaks.com/topic/36779-roll-over/#findComment-175679
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.