Created
March 16, 2010 01:19
-
-
Save cowboy/333531 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
'$:nomunge'; // Used by YUI compressor. | |
// Use $.map instead of $.each because the arguments are reversed, allowing | |
// the function reference to be directly passed as the callback instead of | |
// requiring an anonymous wrapper function. | |
$.map( | |
// All these events will get an "outside" counterpart by default. | |
'blur focus click dblclick mousedown mouseup mouseover mouseout mouseenter mouseleave keydown keypress keyup'.split(' '), | |
// Make the $.addOutsideEvent method available publicly while at the same | |
// time passing a method into $.map. Like many things I do in my plugins, | |
// this is completely gratuitous, and only done to save a few bytes, but | |
// hey, if you're reading this comment maybe it'll give you a laugh. | |
$.addOutsideEvent = jq_addOutsideEvent | |
); | |
function jq_addOutsideEvent( event_name ) { | |
// Do heavy lifting | |
}; | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment