Minggu, 13 Maret 2016


<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>hide demo</title>
  <style>
  span {
    background: #blue;
    padding: 3px;
    float: left;
  }
  </style>
  <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
 <center>
<button id="hider">Hide</button>
<button id="shower">Show</button>
<div>

  <span>Tugas</span> <span>ini</span> <span>dibuat</span>
  <span>untuk</span> <span>memenuhi</span> <span>syarat</span>
  <span>kelulusan</span> <span>mata kuliah</span> <span>Mobile Lanjutan</span>
</div>
 </center>
<script>
$( "#hider" ).click(function() {
  $( "span:last-child" ).hide( "fast", function() {
    // Use arguments.callee so we don't need a named function
    $( this ).prev().hide( "fast", arguments.callee );
  });
});
$( "#shower" ).click(function() {
  $( "span" ).show( 2000 );
});
</script>

</body>
</html>

Tidak ada komentar:

Posting Komentar