Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Effects - Animate demo</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<script>
$(function() {
  var state = true;
  $( "#tab tr" ).hover(function() {
    if ( state ) {
      $(this).stop().animate({
            backgroundColor: "#f99"
      }, 500 );
    } else {
      $(this).stop().animate({
          backgroundColor: "#fff"
      }, 500 );
    }
    state = !state;
  });
});
</script>
</head>
<body>
<table id="tab">
    <tr>
        <td>td1</td>
        <td>td2</td>
    </tr>
    <tr>
        <td>td3</td>
        <td>td4</td>
    </tr>
</table>
</body>
</html>
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers