Hi there,
I just put a jquery plugin to github which I was using in my private projects for a long time now.
jquery-timing provides easy-to-use methods to define timeouts and intervals just in the line with all your jQuery stuff. The goal of this plugin was to write less and do more by avoiding the usage of window.setTimeout() and window.setInterval().
If you like the simplicity and straightforwardness of the following lines then you should check out the plugin:
- // add some CSS class and have it removed half a second later
- $('.mySelection').addClass('loading').wait(500).removeClass('loading');
- // make a text blinking twice a second the whole time
- $('.mySelection').repeat(250).toggleClass('blink');
- // remove DOM elements one by one until they're all gone
- $('span').repeat(500).first().text("I'm dying...").wait(400).remove().until();
Have fun!
- creativecouple