Total members 11894 |It is currently Thu Nov 21, 2024 8:25 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Stop animation in JQuery:
Code:

<html>
<
head>
<
title>Stop animatation in JQuery</title>

<!--
 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
 Note you can download the JQuery package instead of using Google version. --> 
<script src="jquery-1.8.3.js"></script>
<script> 
$(document).ready(function(){
   
         // slides or frames
       $("button.animation").click(function(){
         var div=$("div.to");
         
         div.animate({left:'+=100px',opacity:'0.8'},5000);
  });
     // stop animation
    $("button.stop").click(function(){
    $("div.to").stop();
  });
      
  
   
});


</script> 
</head>
 
<body>
 
<p>Start and stop</p>
 

<div class="to" style="background:#45F233;height:58px;width:58px;left:120px;position:absolute;">
CM
</div>
 
 
<button class="animation">Start Animation</button><br/>
<button class="stop" >Stop</button><br/> 
</body>
</html>





_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Stop animation in JQuery
 stop watch     -  
 Poseidon Infosoft: One Stop Solution for all your IT needs.     -  
 Poseidon Infosoft: One Stop Solution for all your IT needs.     -  
 animation using Photoshop     -  
 Simple animation     -  
 Sprite Animation     -  
 cloud animation     -  
 create Animation in java     -  
 Drawing and rotating Tetrahedron with animation     -  
 Draw Tank with animation and using threads too     -  



Topic Tags

JQuery Animate






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com