Jquery Stop()metodu True , False Değerleri


standart olarak false değerine sahiptir
eğer stop (true,true) olarak ayarlanırsa animasyonu bitirir.
stop (true,false ) olarak belirlenirse animasyonu o anda durdurur

scription">HTML-Kodu:
<style>
#nesne {
    position: absolute;
    background:#066;
    left: 0px;
    top: 30px;
    width: 60px;
    height: 60px;
    margin: 5px;
  }
#dis{
    width:460px;
    height:260px;
    border:1px dashed #069;}
 </style>


<button id="ileri">ileri</button>
<button id="geri">geri</button>
<button id="asagi">asagi</button>
<button id="yukari">yukari</button>
<button id="dur1">DURDUR (true,true)</button>
<button id="dur2">DURDUR (true,false)</button>
<div id="dis">
<div id="nesne"></div>
</div>
<script> 
$( "#dur1" ).click(function() {
  $( "#nesne" ).stop(true,true);
});
$( "#dur2" ).click(function() {
  $( "#nesne" ).stop(true,false);
});


$( "#ileri" ).click(function() {
  $( "#nesne" ).animate({ left: "+=200px" }, 2000 );
}); 


$( "#geri" ).click(function() {
  $( "#nesne" ).animate({ left: "-=100px" }, 2000 );
});


$( "#asagi" ).click(function() {
  $( "#nesne" ).animate({ top: "+=200px" }, 2000 );
});
$( "#yukari" ).click(function() {
  $( "#nesne" ).animate({ top: "-=200px" }, 2000 );
});
</script>