The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
MouseOver Effect - Right Method?
Quick question. I am creating a mouse over effect for a couple of small icons and was just wondering if the method I am using is the most efficient and common way of achieving this. Wrapped below is the main part of the code I am using. It works and it's XHTML valid, however, I was wondering is this the best way to create a mouse over effect.
Code:
onmouseover="document.but.src='icon2.gif'" onmouseout="document.but.src='icon1.gif'" |
#2
|
|||
|
|||
*EDIT*
If I am not mistaken this uses some javascript so this may not be the best way to do it. I'll post back when I can find a better way to do it. If anyone has any good ways to do this let me know I am having trouble finding the right method that will work well in vb3.8.5 |
#3
|
||||
|
||||
I agree, java can be a little dirty in this case. I have it running without issue but I don't feel great about the way I'm doing this. It does work in all browsers, except IE6, of course .
Thanks for posting |
#4
|
|||
|
|||
It could be possible for you to use CSS either. Something like:
HTML Code:
<style type="text/css"> .myclass { background: #000 url(PATH_TO_IMG); } .myclass:hover { background: #000 url(PATH_TO_OTHER_IMG); } </style> <div class="myclass"> Content </div> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|