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 class="Image" id="imageWrap">
<img src="http://www.gb-terror.de/data/media/44/gbpic_smiley_01_www.gb-terror.de.gif" alt="" title="" id="mainImage" height="300px" /> 
</div>
<img class="thumbnail" src="http://www.herrliches-ravensburg.de/GALERIE/Free-Icons/full/santa_smiley.jpg" alt="" title="" height="100px" /> 
<img class="thumbnail" src="http://www.gb-terror.de/data/media/44/gbpic_smiley_01_www.gb-terror.de.gif" alt="" title="" height="100px" />
  
</body>
</html>
 
$(document).ready(function() {
  $('.thumbnail').click(function(){
    $('#imageWrap img').empty();
    $('#imageWrap img').attr('src',$(this).attr('src'));
  });     
});
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers