Site icon Hip-Hop Website Design and Development

wp not defined at wp.Uploader.prototype

I followed this code as below but it gives me the error "wp not defined". I placed the code inside footer.php in my child theme and also in functions.php but both are erroneous.

(function($){

    $.extend( wp.Uploader.prototype, {
        success : function( file_attachment ){
            console.log( file_attachment );
        }
    });
})(jQuery);