jquery.hook
jquery.hook copied to clipboard
Is there a reason why you `makeArray` twice?
I've noticed that you use makeArray twice in unhook, has this a more fundamental reason?
$.unhook = function (fns) {
fns = typeof fns === 'string' ?
fns.split(' ') :
$.makeArray(fns) // 1st makeArray
;
jQuery.each( $.makeArray(fns), function (i, method) { // 2nd makeArray
var cur = $.fn[ method ];
if ( cur && cur.__hookold ) {
$.fn[ method ] = cur.__hookold;
}
});
};
I haven't looked at this in years. If you'd like access to this repo so you can fix it etc let me know.
Ok, I'll bring this repo up to date. Stay tuned...
@yckart I gave you commit access so feel free to make whatever changes you need.