So I currently have an application that is fairly complex with large-scale animations and lots of AJAX requests. When lots of stuff is happening at once, the performance tends to suffer (to approx 5-10 FPS when lots of stuff happens at once) on browsers that are not Chrome, and it gets worse when users are running on the paging file.
So I’d like to offer a “basic” mode, and all it does is converts animations into simplified forms. For instance, .slideDown effectively becomes .hide. I’d like to accomplish this without writing my own custom .slideDownOrHide function so that I can avoid major refactoring.
What’s the best way to go about this?
IE compatibility is not necessary.
I found a convenient shortcut by snooping into the implementation of
jQuery.speed. The gist of it is just to setjQuery.fx.off = true, and it fixesjQuery.speedto set all durations to zero regardless of the argument you pass into it. Turns out it’s actually in the Public API.