If you look at this screenshot, I am trying to have the red image show under a link when you click it. If you click Link 2, it will show under link 2.
It is working in all majore browser except IE 6. When I click a link in IE 6 it loads the on class for the ul, but the image does not show.
Can anyone see a problem with the code I have?
Thanks in advance for your help!
Here is the HTML:
<ul id="slider-links">
<li class="on"><a href="#">Link 1</a><img src="img/slider-handle.png" width="316" height="42"></li>
<li><a href="#">Link 2</a><img src="img/slider-handle.png" width="316" height="42"></li>
<li><a href="#">Link 3</a><img src="img/slider-handle.png" width="316" height="42"></li>
</ul>
Here is the jQuery:
$("#slider-links a").click(function(){
$(this).parent().siblings(".on").removeClass("on");
$(this).parent().addClass("on");
});
Here is the CSS:
#slider-links li {
position: relative;
z-index: 8000;
background: #bed2d9;
border-bottom: 1px solid #69868f;
}
#slider-links li.on a {color: #dbdbdb;}
#slider-links li a {
padding: 10px 15px;
display: block;
color: #234a5b;
font-size: 16px;
font-weight: bold;
text-decoration: none;
position: relative;
z-index: 10000;
}
#slider-links li.on img {display: block;}
#slider-links img {
position: absolute;
top: -1px;
left: 0;
z-index: 9000;
display: none;
}