Small jQuery-plugin for enabling/disabling animations
I’ve been playing around a bit with jQuery for about a month as I’m developing an AJAX-driven admin interface for pici which is coming along nicely.
For this I’m also using some stuff from Effects in jQuery and some might concider animations and so on a bit bloat (although they are so pretty!) so I wanted some way of toggling them. That is, the user should be able to disable them and in that case simply have the data removed/added instead of nicely scrolled up/down.
I wrote a very small plugin for this called jquery.customeffects.js which is probably not a very appropriate name, but whatever.
A functional but not very pretty demo can be found here.
The plugin is only about 20 lines of code, but does it’s job and I thought I might as well put it up here, and not ONLY post about python all the time.
Download here
Using it is explained in the demo. Basically use
$.setFancyAnimations(true)
to enable fancy animations and
$.setFancyAnimations(false)
to disable them.
Then use
hideCustom(optional_params) showCustom(optional_params) toggleCustom(optional_params)
to handle the displaying/hiding of data just like the normal show and hide functions in jQuery.
Recent Comments