Edit This Code:
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $(".btn1").click(function(){
        $("table").animate({borderSpacing: "10px"});
    });
    $(".btn2").click(function(){
        $("table").animate({borderSpacing: "1px"});
    });
});
</script>
<style>
table{border: 1px solid black;}
td{border: 1px solid black;}
</style>
</head>
<body>

<button class="btn1">Animate</button>
<button class="btn2">Reset</button>
<br><br>

<table>
  <tr>
    <td>Peter</td>
    <td>Griffin</td>
  </tr>
  <tr>
    <td>Lois</td>
    <td>Griffin</td>
  </tr>
</table>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy