I looked around online and could not find a specific answer or tutorial on what I would like to do with my hover navigation; The most I found was jquery coding for an image animation or background image animation.
My navigation at the moment is set up with a fade to a different color over hover at the moment. What I would like to do also is that when someone hovers over the navigation, not only does the link fade to a different color (Which I have working), but I also want a arrow image I have to appear to the left of the text. I'd love for it to fade with the text too, but if thats impossible, I'm not picky. To clarify, I do not want the arrow to be shown when the link is not being hovered over.
If it helps at all, here is the current fading jquery I have:
this.fadeLinks = function() {
var selector = "#nav1 a";
var speed = "slow"
var bgcolor = "#6c919a";
$(selector).each(function(){
$(this).css("position","relative");
var html = $(this).html();
$(this).html("<span class=\"one\">"+ html +"</span>");
$(this).append("<span class=\"two\">"+ html +"</span>");
if($.browser.msie){
$("span.one",$(this)).css("background",bgcolor);
$("span.two",$(this)).css("background",bgcolor);
$("span.one",$(this)).css("opacity",1);
};
$("span.two",$(this)).css("opacity",0);
$("span.two",$(this)).css("position","absolute");
$("span.two",$(this)).css("top","0");
$("span.two",$(this)).css("left","0");
$(this).hover(
function(){
$("span.one",this).fadeTo(speed, 0);
$("span.two",this).fadeTo(speed, 1);
},
function(){
$("span.one",this).fadeTo(speed, 1);
$("span.two",this).fadeTo(speed, 0);
}
)
});
};
$(document).ready(function(){
fadeLinks();
});
Here is the css for the navigation:
#nav1 {
width:730px;
top: -380px;
left: -2px;
font-size:20px;
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
color:#ffffff;
padding-top:6px;
padding-bottom:10px;
position:relative;
text-align:center;
line-height:30px;
}
#nav1 a{
font-size:30px;
font-family: Tahoma, Geneva, sans-serif;
color:#fff;
text-decoration:none;
}
#nav1 a span.two{
color:#069;
cursor:pointer;
}
The arrow image I want to appear is "images/arrow.png". I believe for this type of thing I'd need to put the png bug in my coding for IE, yes? Also, if I'd need to put something in my actual html for this, let me know. Thanks in advance!