Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<style>
  .image.active{width:64;height:64;}
  .active{border:2px solid black;}
</style>
</head>
<body>
  
  Click the image or the button<br><br>
  
  <img 
    class="ctrl image"
    src="http://www.gravatar.com/avatar/f9dc5de7822b1679d7133691ec616174?s=32&d=identicon&r=PG">
  
  <br><button class="ctrl button">Grow</button>
  
<script>
  jQuery(function(){
    
    $('.ctrl').bind('click', function(){
      
      $('.ctrl').toggleClass('active');
      if ($('.ctrl.button').hasClass('active')) {
        $('.ctrl.button').text('Shrink');
      }
      else {
        $('.ctrl.button').text('Grow');
      }
      
    });
    
  });
  
</script>
  
  
</body>
</html>
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers