This file contains 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
// is there any reason why I can't use this pattern to replace .live | |
// in favour for .delegate? | |
(function ($) { | |
$.root = $(document); // hat tip: Cory Hart | |
// keep safe | |
$.fn._live = $.fn.live; | |
$.fn._die = $.fn.die; |
This file contains 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
// Leaving foo declaration global, since I don't know | |
// whether you need it outside the scope of the closure. | |
var foo = function() {}; | |
(function() { | |
// The closure has private variables if declared | |
// with "var ...". | |
// Adding event utility functions for event handlers | |
// by John Resig. |