Button Effect - Javascript

plecosword

New Member
Messages
11
Reaction score
0
Points
0
I Don't know any javascript and I need to make the navigation button change a repeated image when it its hovered and another when clicked on. A lot like the buttons from the apple site, at the top.
:drool:
Edit:
anyone?
 
Last edited:

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
This is done using CSS.

Here is the code:
Code:
a.swap {
background-image:url(image1.jpg);
}

a.swap:hover {
background-image:url(image2.jpg);
}

HTML:
<a href="#" class="swap">The actual link</a>
 
Last edited:

plecosword

New Member
Messages
11
Reaction score
0
Points
0
Thanks, it works, but it only changes the background behind the txt, not the whole button. Im guessing I will either have to create the full size image for the button rather than having it repeating, or use Javascript
 
Top