Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  
  
  <div id="images">
    <img src="http://ipsumimage.appspot.com/140x100?l=1" alt="" />
    <img src="http://ipsumimage.appspot.com/140x100?l=2" alt="" />
    <img src="http://ipsumimage.appspot.com/140x100?l=3" alt="" />  
  </div>
  
  <ul id="links">
    <li><a href="#">Link1</a></li>
    <li><a href="#">Link2</a></li>
    <li><a href="#">Link3</a></li>
  </ul>
  
  
</body>
</html>
 
#images{
height:100px;
}
#images img{
  position:absolute;
  display:none;
}
 
$('#links li').on('mouseenter mouseleave',function(e){
  $('#images img').stop().fadeTo(300,0);
  if(e.type=='mouseenter'){
     $('#images img').eq( $(this).index() ).stop().fadeTo(300,1);
  }
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers