Demo JQuery .show(), .hide() dan .toggle()

by Taufik Nurrohman

HTML

<button class="sentuh">Sentuh!</button>
<div id="target"></div>

CSS

body {padding:30px;}

#target {
  background:#9D0053;
  height:160px;
  padding:5px;
}

JavaScript

$('.sentuh').hover(function() {
   $('#target').hide('slow');
}, function() {
   $('#target').show('slow');
});