(function ($) {
    
    var overrideMethods = {

        checkPosition : function () {
            console.log("meow");
        }
    };

    $.extend(true, $.fn.affix.Constructor.prototype, overrideMethods);
    
})(jQuery);

Here the method checkPosition() from the affix plugin is overridden.

Categories: JavaScript