Home Tutorial Jquery jQuery.fx.off

 
 

Share on Google+Share on Google+
jQuery.fx.off
Posted on: August 4, 2010 at 12:00 AM
Advertisement
In this tutorial, we will discuss about "jQuery.fx.off" property.

jQuery.fx.off

In this tutorial, we will discuss about "jQuery.fx.off" property. When this property is set to true, all animation methods will immediately set elements to their final state when called, rather than displaying an effect.

jQueryfx.html

<!DOCTYPE html>
<html>
<head>
<style>
div { width:150px; height:130px; margin:15px; float:left;
background:purple; }
</style>
<script src="jquery-1.4.2.js"></script>
</head>
<body>
<p><input type="button" value="Run"/> <button>Toggle fx</button></p>
<div></div>
<script>
var toggleFx = function() {
$.fx.off = !$.fx.off;
};
toggleFx();

$("button").click(toggleFx)

$("input").click(function(){
$("div").toggle("slow");
});
</script>
</body>
</html>

OUTPUT

Description of the program

When application starts, and if you click on "run" , it will hide slowly showing you a animation effect. But when you click on "Togglefx" button ,it will only show/hide on clicking "Run " without showing you any animation effect .

Download Source Code 

Click here to see demo

Advertisement

Related Tags for jQuery.fx.off:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: August 4, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com