Skip to content

Instantly share code, notes, and snippets.

@kuruma-gs
Created August 2, 2011 04:39
Show Gist options
  • Save kuruma-gs/1119614 to your computer and use it in GitHub Desktop.
Save kuruma-gs/1119614 to your computer and use it in GitHub Desktop.
jquery.tap.js
/*!
* 2009 Jiayong Ou
*
* License (MIT):
* http://github.com/jou/jquery.tap.js/blob/master/LICENSE
*/
(function(){
jQuery.fn.tap = function(fn /* [callback_arg], [callback_arg], [...] */) {
var args = jQuery.makeArray(arguments);
args.unshift();
if(this.length!=0) fn.apply(this, args);
return this;
};
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment