Skip to content

Instantly share code, notes, and snippets.

@cowboy
Created November 15, 2009 20:40
Show Gist options
  • Save cowboy/235449 to your computer and use it in GitHub Desktop.
Save cowboy/235449 to your computer and use it in GitHub Desktop.
// ============================== //
// 1
// ============================== //
// create
var q = $.qq({
delay: 100,
oneach: function( item ) { console.log( item ); }
});
// add items
q.add( 'foo' );
q.add( 'bar' );
// add jquery collection
$('a').qqAdd( q );
// pause
q.pause();
// ============================== //
// 2
// ============================== //
// create
$.qq( 'my_queue', {
delay: 100,
oneach: function( item ) { console.log( item ); }
});
// add items
$.qqAdd( 'my_queue', 'foo' );
$.qqAdd( 'my_queue', 'bar' );
// add jquery collection
$('a').qqAdd( 'my_queue' );
// pause
$.qqPause( 'my_queue' );
// ============================== //
// 3
// ============================== //
// create
$.qq( 'my_queue', {
delay: 100,
oneach: function( item ) { console.log( item ); }
});
// add items
$.qq( 'my_queue', 'add', 'foo' );
$.qq( 'my_queue', 'add', 'bar' );
// add jquery collection
$('a').qq( 'my_queue', 'add' );
// pause
$.qq( 'my_queue', 'pause' );
// ============================== //
// 4
// ============================== //
// create
$.qq( 'my_queue', {
delay: 100,
oneach: function( item ) { console.log( item ); }
});
// add items
$.qq( 'add', 'my_queue', 'foo' );
$.qq( 'add', 'my_queue', 'bar' );
// add jquery collection
$('a').qq( 'add', 'my_queue' );
// pause
$.qq( 'pause', 'my_queue' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment