Skip to content

Instantly share code, notes, and snippets.

View KrofDrakula's full-sized avatar

Klemen Slavič KrofDrakula

View GitHub Profile
// 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;
// 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.