There are five divs, and by default they have some kind of hover, you need to make sure that the last one from which we took the mouse has a hover; script is something like
<html> <head> <script type = "text/javascript"> $(document).ready( function(){ $(".leftBlock").hover(function(){ $("#image").attr("src",$(this).attr("image_src"))}, function(){$("#image").attr("src","default_image_url");} }); </script> </head> <body> <div class="leftBlock" image_src="image1.jpg"> Left Block 1 </div> <div class="leftBlock" image_src="image2.jpg"> Left Block 2 </div> <div class="leftBlock" image_src="image3.jpg"> Left Block 3 </div> <div class="leftBlock" image_src="image4.jpg"> Left Block 4 </div> <div class="leftBlock" image_src="image5.jpg"> Left Block 5 </div> <div id="image_div" ><img id="image" src="default.jpg"/></div> </body> </html>
I would be grateful for the help with jQuery, but I'm with you)