Yesterday I came across jQuery.fx.off
setting in jQuery documentation. It disables all jQuery animations effective immediately when you set it's value to true
.
Consider this code:
jQuery.fx.off = true; $("input").click(function(){ $("div").toggle("slow"); });
Your div will be showed/hidden immediately without animation. One of the reasons (as documentation mentions) to disable animations would be "slow" environments.
Thanks!.. I always hate unnecessary animations.
ReplyDelete