Log in

View Full Version : Rollover Images


Trana
02-20-2010, 04:05 AM
Does anyone know an easy way to do rollover images in a post?

I tried using the normal CSS image swap but the IMG/A tag I used keeps getting changed into a BBCODE link:

<a class="rollover2" href="http://www.xxx.com/x.html">&nbsp;</a>

Anyone have a solution or another way to do this?

Thanks!

Karm4
02-20-2010, 06:41 AM
Iv been able to do 1 rollover image but when i duplicate for 2nd image neither image does rollover but they appear fine. Everything works but rollover. I'll show you my code its pretty easy to read. Maybe you can get someone to tell me what im doing wrong also.
1st is posted in headinclude 2nd is posted in header
<script language="Javascript">
<!--

if (document.images) {
button1 = new Image
button2 = new Image
button3 = new Image
button4 = new Image
button5 = new Image
button6 = new Image

button1.src = '/vb/images/youtube.png'
button2.src = '/vb/images/youtubeinvert.png'
button3.src = '/vb/images/facebook.png'
button4.src = '/vb/images/facebookinvert.png'
button5.src = '/vb/images/mail.png'
button6.src = '/vb/images/mailinvert.png'
}
//-->
</script>


<a href="http://www.youtube.com/itzboosted" target="_blank" ONMOUSEOVER="document.rollover.src=button2.src" ONMOUSEOUT="document.rollover.src=button1.src"><img src="/vb/images/youtube.png" border=0 name="rollover" align="right" alt="ItzBoosted.net Youtube"></a>

<a href="http://www.facebook.com/#!/pages/Cleveland-OH/ItzBoostednet/156413949058?ref=ts" target="_blank" ONMOUSEOVER="document.rollover.src=button4.src" ONMOUSEOUT="document.rollover.src=button3.src"><img src="/vb/images/facebook.png" border=0 name="rollover" align="right" alt="ItzBoosted.net Fans"></a>

<a href="http://www.itzboosted.net/vb/sendmessage.php" target="_blank" ONMOUSEOVER="document.rollover.src=button6.src" ONMOUSEOUT="document.rollover.src=button5.src"><img src="/vb/images/mail.png" border=0 name="rollover" align="right" alt="ItzBoosted.net E-Mail"></a>


The 3 buttons are the Mail/Facebook/Youtube image above the userlogin - here is some pics

IMG code isnt loading but link is http://s1018.photobucket.com/albums/af304/Karm4/?action=view&current=ibnimage.jpg
or you can visit my site @ www.itzboosted.net

http://s1018.photobucket.com/albums/af304/Karm4/?action=view&current=ibnimage.jpg

Trana
02-20-2010, 08:07 AM
Yeah, I definitely need more than 1 rollover per post.

Karm4
02-20-2010, 08:22 AM
Iv tried a million different ways, there has to be something im just missing on my script cause everything feels right.