Skip to content

Instantly share code, notes, and snippets.

@quinn
Created October 31, 2008 18:31
Show Gist options
  • Save quinn/21383 to your computer and use it in GitHub Desktop.
Save quinn/21383 to your computer and use it in GitHub Desktop.
$.fn.tap = function (fun) {
fun.call(this)
}
// oops this is pointless, these are the same
$('whatever')
.tap(function () {
this // is pointless
});
// same as
function () {
}.call( $('whatever') );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment