Difference between revisions of "User:Benjamin Miller"

From OpenWetWare
Jump to: navigation, search
Line 6: Line 6:
 
     $(document).ready(function(){
 
     $(document).ready(function(){
 
       $('#side1').mouseover(function() {
 
       $('#side1').mouseover(function() {
       $('#side1').animate({backgroundPosition: '0px 0px'}, 1000);
+
       $('#side1').stop().animate({backgroundPosition: '0px 0px'}, 1000);
 
       });
 
       });
 
       $('#side1').mouseleave(function() {
 
       $('#side1').mouseleave(function() {
       $('#side1').animate({backgroundPosition: '-250px 0px'}, 1000);
+
       $('#side1').stop().animate({backgroundPosition: '-250px 0px'}, 1000);
 
       });
 
       });
 
$('#side2').mouseover(function() {
 
$('#side2').mouseover(function() {
       $('#side2').animate({backgroundPosition: '0px 0px'}, 1000);
+
       $('#side2').stop().animate({backgroundPosition: '0px 0px'}, 1000);
 
       });
 
       });
 
       $('#side2').mouseleave(function() {
 
       $('#side2').mouseleave(function() {
       $('#side2').animate({backgroundPosition: '-250px 0px'}, 1000);
+
       $('#side2').stop().animate({backgroundPosition: '-250px 0px'}, 1000);
 
       });
 
       });
 
$('#side3').mouseover(function() {
 
$('#side3').mouseover(function() {
       $('#side3').animate({backgroundPosition: '0px 0px'}, 1000);
+
       $('#side3').stop().animate({backgroundPosition: '0px 0px'}, 1000);
 
       });
 
       });
 
       $('#side3').mouseleave(function() {
 
       $('#side3').mouseleave(function() {
       $('#side3').animate({backgroundPosition: '-250px 0px'}, 1000);
+
       $('#side3').stop().animate({backgroundPosition: '-250px 0px'}, 1000);
 
       });
 
       });
 
     });
 
     });

Revision as of 09:58, 16 September 2010

<html>

<head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
   <script type="text/javascript">
    $(document).ready(function(){
     $('#side1').mouseover(function() {
      $('#side1').stop().animate({backgroundPosition: '0px 0px'}, 1000);
     });
     $('#side1').mouseleave(function() {
      $('#side1').stop().animate({backgroundPosition: '-250px 0px'}, 1000);
     });

$('#side2').mouseover(function() {

      $('#side2').stop().animate({backgroundPosition: '0px 0px'}, 1000);
     });
     $('#side2').mouseleave(function() {
      $('#side2').stop().animate({backgroundPosition: '-250px 0px'}, 1000);
     });

$('#side3').mouseover(function() {

      $('#side3').stop().animate({backgroundPosition: '0px 0px'}, 1000);
     });
     $('#side3').mouseleave(function() {
      $('#side3').stop().animate({backgroundPosition: '-250px 0px'}, 1000);
     });
    });

</script>

 <style type="text/css">
  #side1 {
   width: 250px;
   height: 100px;
   background: url(http://openwetware.org/images/d/df/Imperialigemsideone.jpg) -250px 0px no-repeat;
   position: absolute;
   top: 50px;
   left: 650px;}
  1. side2 {
   width: 250px;
   height: 100px;
   background: url(http://openwetware.org/images/6/66/Imperialigemsidetwo.jpg) -250px 0px no-repeat;
   position: absolute;
   top: 200px;
   left: 650px;}
  1. side3 {
   width: 250px;
   height: 100px;
   background: url(http://openwetware.org/images/e/ea/Imperialigemsidethree.jpg) -250px 0px no-repeat;
   position: absolute;
   top: 350px;
   left: 650px;}
 </style>
</head>
<body>
 <div id='side1'>
 </div>
 <div id='side2'>
 </div>
 <div id='side3'>
 </div>
</body>

</html>
















<html> </html>