Learn free online HTML5, javascript, and jquery Tutorials by Examples

Monday 2 June 2014

disable all jQuery animations at once

------------------------------------------
<script src="http://http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> 
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("div").animate({ height:'toggle' });
  });
jQuery.fx.off = true;

});
</script>

<button>Start Animation</button>

<div style="background:#98bf21;height:100px;width:100px;position:absolute;"></div>

-----------------------------------------

No comments:

Post a Comment