Forgive my ignorance as I am not as familiar with jquery. Is there an equivalent to dojo.hitch()? It returns a function that is guaranteed to be executed in the given scope.
/** * This is for simulate dojo.hitch. * @param $ */ (function($) { $.hitch = function(context, func) { var args = Array.prototype.slice.call(arguments, 2/*Remove context, and func*/); return function() { return func.apply(context, Array.prototype.concat.call(args, arguments)); }; }; })(jQuery);