Good day. I'm doing some design like this in my banner(saksoff5th.com) I use slideToggle instead. When I hover images on the left the banner images on the right will change. But I'm having difficulties in hovering the images on the right. Like when I hover images on the left, the images on the right is wrong. I don't have any idea also how can I make my images appears properly on the right part. They are all in one vertical. I want it to work like if I hover the first image on the left, the first image on the right will appear. When I hover the second image on the right, the second image will appear and the first image will hide etc.
Here is my jsfiddle(http://jsfiddle.net/deanilvincent/7Lgks56u/2/) Note: It's now working! Thanks for the help :D
Help me to fix this. Thanks in advance.
My HTML Tags:
<div class="container">
<div id="left-panel">
<ul>
<li class="first-left"><a href="#"><img src="images/1st.png" /></a></li>
<li class="second-left"><a href="#"><img src="images/2nd.png" /></a></li>
<li class="third-left"><a href="#"><img src="images/3rd.png" /></a></li>
<li class="fourth-left"><a href="#"><img src="images/4th.png" /></a></li>
</ul>
</div>
<div id="right-panel">
<ul>
<li class="first-right"><a href="#"><img src="images/banner1.jpg" /></a></li>
<li class="second-right"><a href="#"><img src="images/banner2.jpg" /></a></li>
<li class="third-right"><a href="#"><img src="images/banner3.jpg" /></a></li>
<li class="fourth-right"><a href="#"><img src="images/banner4.jpg" /></a></li>
</ul>
</div>
</div>
My Javascript/Jquery:
$(document).ready(function(){
$("#left-panel ul li.first-left").mouseover(function(){
$("#right-panel ul li.first-right").slideToggle("Fast");
});
$("#left-panel ul li.second-left").mouseover(function(){
$("#right-panel ul li.second-right").slideToggle("Fast");
});
$("#left-panel ul li.third-left").mouseover(function(){
$("#right-panel ul li.third-right").slideToggle("Fast");
});
$("#left-panel ul li.fourth-left").mouseover(function(){
$("#right-panel ul li.fourth-right").slideToggle("Fast");
});
});
My CSS:
.container{
width:1200px;
margin:0px auto;
}
#left-panel{
width:20%;
float:left;
}
#left-panel ul li a:hover{
background-color:#eeeeee;
}
#left-panel ul li{
list-style-type:none;
}
#right-panel ul li{
list-style-type:none;
}
#right-panel{
width:80%;
float:left;
}