The jQuery.fx.off method is used to globally enable or disable jQuery animations whose default value is false which allows animations to run normally.
jQuery.fx.off = true|false;
$.fx.off = true|false;
The true value specifies that the animations should be disabled and the false value is default value which specifies that the animations should be enabled.
Read Also: jQuery jQuery scroll to element
<button id="disable">Disable</button> <button id="enable">Enable</button> <button id="toggle">Toggle animation</button> <div style="background:#C2C2C2;height:100px;width:100px;"></div>
<script>
$(document).ready(function(){
$("#disable").click(function(){
jQuery.fx.off = true;
});
$("#enable").click(function(){
jQuery.fx.off = false;
});
$("#toggle").click(function(){
$("div").toggle("slow");
});
});
</script>
In this way you can enable/disable the animations by setting the property to true or false.
Go to jQuery reference for more information.
In today’s fast-paced and highly competitive marketing environment, even the most creative campaign is only…
We are NYC moving firm. Are you planning a flat move? Maybe a distance or…
Mobile devices, unlike desktops and laptops, can not be handled by dozens or hundreds of…
Augmented Reality- An immersive experience for the learners! Learning and education aren’t the same as…
On special days like birthdays and weddings, we all like to celebrate our loved ones…
A web application is different from a regular mobile or desktop application as it runs…